ffmpeg.git
7 years agox86: swscale: Place inline assembly code under appropriate #ifdefs
Ronald S. Bultje [Sun, 15 Jul 2012 04:25:55 +0000 (21:25 -0700)]
x86: swscale: Place inline assembly code under appropriate #ifdefs

Fixes compilation for compilers that do not support gcc inline assembly.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agortsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.
Ronald S. Bultje [Sat, 21 Jul 2012 14:13:48 +0000 (14:13 +0000)]
rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.

This makes usage of the macro look more natural when
used with array entries.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agoconfigure: Remove redundant RTMPT/RTMPTS dependencies
Samuel Pitoiset [Thu, 19 Jul 2012 12:16:01 +0000 (14:16 +0200)]
configure: Remove redundant RTMPT/RTMPTS dependencies

The incompatibility with librtmp is already expressed in the ffrtmphttp
protocol dependency declaration, which both RTMPT and RTMPTS depend on.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agoconfigure: add filtering of host cflags/ldflags
Mans Rullgard [Fri, 20 Jul 2012 12:48:13 +0000 (13:48 +0100)]
configure: add filtering of host cflags/ldflags

This is in preparation for supporting host compilers with
non-standard flags.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoconfigure: initialise all flag filters at the same place
Mans Rullgard [Fri, 20 Jul 2012 11:20:23 +0000 (12:20 +0100)]
configure: initialise all flag filters at the same place

This is more consistent, and doing it earlier is harmless.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoconfigure: add filtering of linker flags
Mans Rullgard [Fri, 20 Jul 2012 02:06:49 +0000 (03:06 +0100)]
configure: add filtering of linker flags

This allows filtering of linker flags the same was as already
supported for CFLAGS.  The filter must be initialised to 'echo'
early since it is invoked by --extra-ldflags.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoconfigure: name some variables more consistently
Mans Rullgard [Fri, 20 Jul 2012 11:02:18 +0000 (12:02 +0100)]
configure: name some variables more consistently

Name variables pertaining to various types of flags with 'cflags' etc
as prefix instead of suffix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoconfigure: remove filter_cppflags
Mans Rullgard [Fri, 20 Jul 2012 11:02:29 +0000 (12:02 +0100)]
configure: remove filter_cppflags

This is not used and the current design would not work properly
if mixing tools needing different filters.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoconfigure: set icc_version where it is needed
Mans Rullgard [Wed, 18 Jul 2012 19:40:38 +0000 (20:40 +0100)]
configure: set icc_version where it is needed

This variable is only used once, so setting it there is clearer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agompegenc: remove disabled code
Diego Biurrun [Fri, 29 Jul 2011 10:01:37 +0000 (12:01 +0200)]
mpegenc: remove disabled code

7 years agolavfi: unref AVFilterLink.out_buf in ff_end_frame().
Anton Khirnov [Sat, 14 Jul 2012 15:09:43 +0000 (17:09 +0200)]
lavfi: unref AVFilterLink.out_buf in ff_end_frame().

This reduces code duplication and prevents stale pointers from remaining
on the link.

7 years agolavfi: unref AVFilterLink.cur_buf in ff_end_frame().
Anton Khirnov [Sat, 14 Jul 2012 15:09:43 +0000 (17:09 +0200)]
lavfi: unref AVFilterLink.cur_buf in ff_end_frame().

This reduces code duplication and prevents stale pointers from remaining
on the link.

7 years agovsrc_testsrc: avoid an unnecessary avfilter_ref_buffer().
Anton Khirnov [Sun, 15 Jul 2012 09:12:10 +0000 (11:12 +0200)]
vsrc_testsrc: avoid an unnecessary avfilter_ref_buffer().

7 years agovf_slicify: clear AVFilterLink.cur_buf in start_frame().
Anton Khirnov [Wed, 11 Jul 2012 07:58:43 +0000 (09:58 +0200)]
vf_slicify: clear AVFilterLink.cur_buf in start_frame().

The buffer is passed on to the next filter, so we shouldn't keep any
pointers to it.

7 years agovf_settb: simplify start_frame().
Anton Khirnov [Wed, 11 Jul 2012 09:00:48 +0000 (11:00 +0200)]
vf_settb: simplify start_frame().

Avoid pointless filter ref/unref. Just use the reference passed to
start_frame().

7 years agovf_fieldorder: don't give up its own reference to the output buffer.
Anton Khirnov [Sun, 8 Jul 2012 15:01:17 +0000 (17:01 +0200)]
vf_fieldorder: don't give up its own reference to the output buffer.

7 years agovf_pad: don't give up its own reference to the output buffer.
Anton Khirnov [Sun, 8 Jul 2012 15:01:17 +0000 (17:01 +0200)]
vf_pad: don't give up its own reference to the output buffer.

7 years agovf_overlay: don't access a buffer reference that's been given away.
Anton Khirnov [Sun, 8 Jul 2012 03:34:20 +0000 (05:34 +0200)]
vf_overlay: don't access a buffer reference that's been given away.

7 years agovf_drawtext: don't give up its own reference to the input buffer.
Anton Khirnov [Sun, 8 Jul 2012 02:20:22 +0000 (04:20 +0200)]
vf_drawtext: don't give up its own reference to the input buffer.

Directly forwarding the input buffer to the next filter means that
drawtext no longer owns any references to it and thus shouldn't refer to
it in any way.

7 years agovf_gradfun: don't store two pointers to one AVFilterBufferRef.
Anton Khirnov [Sun, 8 Jul 2012 02:07:05 +0000 (04:07 +0200)]
vf_gradfun: don't store two pointers to one AVFilterBufferRef.

7 years agovf_delogo: don't store two pointers to one AVFilterBufferRef.
Anton Khirnov [Sun, 8 Jul 2012 02:07:05 +0000 (04:07 +0200)]
vf_delogo: don't store two pointers to one AVFilterBufferRef.

7 years agovf_aspect: clear AVFilterLink.cur_buf in start_frame().
Anton Khirnov [Wed, 11 Jul 2012 07:58:43 +0000 (09:58 +0200)]
vf_aspect: clear AVFilterLink.cur_buf in start_frame().

The buffer is passed on to the next filter, so we shouldn't keep any
pointers to it.

7 years agolavfi: add avfilter_unref_bufferp()
Robert Nagy [Mon, 16 Apr 2012 06:17:25 +0000 (08:17 +0200)]
lavfi: add avfilter_unref_bufferp()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolibopenjpeg: introduce lowres and lowqual private options
Luca Barbato [Wed, 18 Jul 2012 23:31:39 +0000 (01:31 +0200)]
libopenjpeg: introduce lowres and lowqual private options

OpenJPEG can decode in lower resolution or decode only a number
of enhancement layers.

7 years agoFATE: add a test for flac cover art.
Anton Khirnov [Wed, 4 Jul 2012 08:46:10 +0000 (10:46 +0200)]
FATE: add a test for flac cover art.

7 years agocafdec: allow larger ALAC magic cookie
Justin Ruggles [Thu, 19 Jul 2012 23:48:21 +0000 (19:48 -0400)]
cafdec: allow larger ALAC magic cookie

It already skips any extra bytes at the end, and apparently there are some
samples in the wild with larger 'kuki' chunks.

7 years agoalac: fix channel pointer assignment for 24 and 32-bit
Justin Ruggles [Thu, 19 Jul 2012 23:47:08 +0000 (19:47 -0400)]
alac: fix channel pointer assignment for 24 and 32-bit

Needs to be done separately for each element.

7 years agoalac: cosmetics: general pretty-printing and comment clean up
Justin Ruggles [Mon, 9 Jul 2012 21:02:42 +0000 (17:02 -0400)]
alac: cosmetics: general pretty-printing and comment clean up

7 years agoalac: calculate buffer size outside the loop in allocate_buffers()
Justin Ruggles [Mon, 9 Jul 2012 20:57:22 +0000 (16:57 -0400)]
alac: calculate buffer size outside the loop in allocate_buffers()

7 years agoalac: change some data types to plain int
Justin Ruggles [Mon, 9 Jul 2012 20:56:34 +0000 (16:56 -0400)]
alac: change some data types to plain int

7 years agoalac: cosmetics: rename some variables and function names
Justin Ruggles [Mon, 9 Jul 2012 20:52:19 +0000 (16:52 -0400)]
alac: cosmetics: rename some variables and function names

7 years agoalac: multi-channel decoding support
Andrew D'Addesio [Mon, 9 Jul 2012 20:29:49 +0000 (16:29 -0400)]
alac: multi-channel decoding support

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoalac: split element parsing into a separate function
Justin Ruggles [Mon, 9 Jul 2012 20:05:53 +0000 (16:05 -0400)]
alac: split element parsing into a separate function

This will make multi-channel implementation simpler.
Based partially on a patch by Andrew D'Addesio <modchipv12@gmail.com>.

7 years agoalac: support a read sample size of up to 32
Justin Ruggles [Mon, 9 Jul 2012 19:38:58 +0000 (15:38 -0400)]
alac: support a read sample size of up to 32

Use get_bits_long() in decode_scalar().
Use unsigned int for decoded value.

7 years agoalac: output in planar sample format
Justin Ruggles [Mon, 9 Jul 2012 19:18:51 +0000 (15:18 -0400)]
alac: output in planar sample format

Avoids unneeded interleaving and allows for reusing the AVFrame output buffer
as the internal buffer for 24-bit and 32-bit sample size.

7 years agoalac: add 32-bit decoding support
Justin Ruggles [Mon, 9 Jul 2012 18:36:03 +0000 (14:36 -0400)]
alac: add 32-bit decoding support

7 years agoalac: simplify channel interleaving
Andrew D'Addesio [Mon, 9 Jul 2012 18:34:41 +0000 (14:34 -0400)]
alac: simplify channel interleaving

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoalac: use AVPacket fields directly in alac_decode_frame()
Justin Ruggles [Mon, 9 Jul 2012 17:30:03 +0000 (13:30 -0400)]
alac: use AVPacket fields directly in alac_decode_frame()

7 years agoalac: fix check for valid max_samples_per_frame
Justin Ruggles [Mon, 9 Jul 2012 17:23:22 +0000 (13:23 -0400)]
alac: fix check for valid max_samples_per_frame

7 years agoalac: use get_sbits() to read LPC coefficients instead of casting
Justin Ruggles [Mon, 9 Jul 2012 17:19:10 +0000 (13:19 -0400)]
alac: use get_sbits() to read LPC coefficients instead of casting

7 years agoalac: move the current samples per frame to the ALACContext
Justin Ruggles [Mon, 9 Jul 2012 17:15:35 +0000 (13:15 -0400)]
alac: move the current samples per frame to the ALACContext

This will simplify the multi-channel implementation.

7 years agoalac: avoid using a double-negative when checking if the frame is compressed
Justin Ruggles [Mon, 9 Jul 2012 17:05:35 +0000 (13:05 -0400)]
alac: avoid using a double-negative when checking if the frame is compressed

7 years agoalac: factor out output_size check in predictor_decompress_fir_adapt()
Justin Ruggles [Mon, 9 Jul 2012 17:01:32 +0000 (13:01 -0400)]
alac: factor out output_size check in predictor_decompress_fir_adapt()

7 years agoalac: factor out loading of next decoded sample in LPC prediction
Justin Ruggles [Mon, 9 Jul 2012 16:57:16 +0000 (12:57 -0400)]
alac: factor out loading of next decoded sample in LPC prediction

7 years agoalac: use index into buffer_out instead of incrementing the pointer
Justin Ruggles [Mon, 9 Jul 2012 16:52:30 +0000 (12:52 -0400)]
alac: use index into buffer_out instead of incrementing the pointer

7 years agoalac: simplify lpc coefficient adaptation
Justin Ruggles [Mon, 9 Jul 2012 15:33:31 +0000 (11:33 -0400)]
alac: simplify lpc coefficient adaptation

7 years agoalac: reduce the number of local variables needed in lpc prediction
Justin Ruggles [Mon, 9 Jul 2012 15:18:21 +0000 (11:18 -0400)]
alac: reduce the number of local variables needed in lpc prediction

7 years agoalac: simplify 1st order prediction and reading of warm-up samples
Justin Ruggles [Mon, 9 Jul 2012 15:12:25 +0000 (11:12 -0400)]
alac: simplify 1st order prediction and reading of warm-up samples

7 years agoalac: cosmetics: reindent after last commit
Justin Ruggles [Mon, 9 Jul 2012 15:08:59 +0000 (11:08 -0400)]
alac: cosmetics: reindent after last commit

7 years agoalac: remove unneeded conditionals in predictor_decompress_fir_adapt()
Justin Ruggles [Mon, 9 Jul 2012 15:07:57 +0000 (11:07 -0400)]
alac: remove unneeded conditionals in predictor_decompress_fir_adapt()

7 years agoalac: use sizeof() instead of hardcoded data sizes
Justin Ruggles [Mon, 9 Jul 2012 15:04:56 +0000 (11:04 -0400)]
alac: use sizeof() instead of hardcoded data sizes

7 years agoalac: make block_size signed
Justin Ruggles [Mon, 9 Jul 2012 15:02:48 +0000 (11:02 -0400)]
alac: make block_size signed

It does not need to be unsigned.

7 years agoalac: remove a duplicate local variable
Justin Ruggles [Mon, 9 Jul 2012 15:00:16 +0000 (11:00 -0400)]
alac: remove a duplicate local variable

7 years agoalac: conditionally set sign_modifier to 1
Justin Ruggles [Mon, 9 Jul 2012 14:57:42 +0000 (10:57 -0400)]
alac: conditionally set sign_modifier to 1

It is already unconditionally set to 0 prior to this, so we can modify it
only when needed.

7 years agoalac: eliminate 2 unneeded local variables in bastardized_rice_decompress()
Justin Ruggles [Mon, 9 Jul 2012 14:53:28 +0000 (10:53 -0400)]
alac: eliminate 2 unneeded local variables in bastardized_rice_decompress()

x_modified is just unnecessary, and final_val can be removed by simplifying
the unsigned-to-signed conversion.

7 years agoalac: adjust conditions for updating entropy decoder history
Justin Ruggles [Mon, 9 Jul 2012 14:42:52 +0000 (10:42 -0400)]
alac: adjust conditions for updating entropy decoder history

avoids some unnecessary arithmetic in certain situations

7 years agoalac: cosmetics: reindent after last commit
Justin Ruggles [Mon, 9 Jul 2012 14:34:11 +0000 (10:34 -0400)]
alac: cosmetics: reindent after last commit

7 years agoalac: limit the rice param before passing to decode_scalar()
Justin Ruggles [Mon, 9 Jul 2012 14:33:28 +0000 (10:33 -0400)]
alac: limit the rice param before passing to decode_scalar()

reduces the number of parameters to decode_scalar() and slightly simplifies
the code

7 years agoalac: reduce the number of parameters to bastardized_rice_decompress()
Justin Ruggles [Mon, 9 Jul 2012 14:30:40 +0000 (10:30 -0400)]
alac: reduce the number of parameters to bastardized_rice_decompress()

Use the ALACContext fields directly instead.

7 years agoalac: cosmetics: rename some ALACContext parameters
Justin Ruggles [Mon, 9 Jul 2012 14:23:47 +0000 (10:23 -0400)]
alac: cosmetics: rename some ALACContext parameters

7 years agoalac: clean up and update comments leftover from reverse-engineering
Justin Ruggles [Mon, 9 Jul 2012 14:10:02 +0000 (10:10 -0400)]
alac: clean up and update comments leftover from reverse-engineering

7 years agoavformat: move 'chan' tag parsing to mov_chan.c to share with the CAF demuxer
Justin Ruggles [Sat, 7 Apr 2012 16:40:50 +0000 (12:40 -0400)]
avformat: move 'chan' tag parsing to mov_chan.c to share with the CAF demuxer

7 years agocaf: use int64_t for num_packets
Justin Ruggles [Mon, 9 Jul 2012 18:16:37 +0000 (14:16 -0400)]
caf: use int64_t for num_packets

It is used to store a value read by avio_rb64().

7 years agocaf: fix 'pakt' chunk parsing
Justin Ruggles [Mon, 9 Jul 2012 18:10:52 +0000 (14:10 -0400)]
caf: fix 'pakt' chunk parsing

according to the CAF specification:
"... the value for mChunkSize can be greater than the actual valid content
of the packet table chunk"

7 years agocaf: support either old or new style ALAC magic kuki chunk
Justin Ruggles [Sun, 8 Jul 2012 23:33:10 +0000 (19:33 -0400)]
caf: support either old or new style ALAC magic kuki chunk

7 years agoPrint full compiler identification, not only version number
Mans Rullgard [Wed, 18 Jul 2012 16:57:57 +0000 (17:57 +0100)]
Print full compiler identification, not only version number

This provides a more precise identification of the compiler used.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoflacdec: reverse lpc coeff order, simplify filter
Mans Rullgard [Thu, 5 Jul 2012 11:25:40 +0000 (12:25 +0100)]
flacdec: reverse lpc coeff order, simplify filter

Reversing the lpc coefficient order simplifies indexing in
the filter.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agox86: dsputil: drop some unused CPU flag debug code
Diego Biurrun [Wed, 18 Jul 2012 07:46:38 +0000 (09:46 +0200)]
x86: dsputil: drop some unused CPU flag debug code

7 years agoppc: fix build with altivec disabled
Mans Rullgard [Wed, 18 Jul 2012 12:22:46 +0000 (13:22 +0100)]
ppc: fix build with altivec disabled

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agovp3: move idct and loop filter pointers to new vp3dsp context
Mans Rullgard [Tue, 17 Jul 2012 15:47:43 +0000 (16:47 +0100)]
vp3: move idct and loop filter pointers to new vp3dsp context

This moves all VP3-specific function pointers from dsputil to a
new vp3dsp context.  There is no reason to ever use the VP3 IDCT
where an MPEG2 IDCT is expected or vice versa.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agobuild: add CONFIG_VP3DSP, reduce repetition in OBJS lists
Mans Rullgard [Mon, 16 Jul 2012 11:50:14 +0000 (12:50 +0100)]
build: add CONFIG_VP3DSP, reduce repetition in OBJS lists

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agotscc2: do not add/subtract 128 bias during DCT
Kostya Shishkov [Tue, 17 Jul 2012 16:12:41 +0000 (18:12 +0200)]
tscc2: do not add/subtract 128 bias during DCT

It turns out that the reference decoder subtracts 128 from DC during block
decode but adds it back during reordering block with zigzag pattern.
Transforming block with incorrect DC caused heavy visual artifacts for
many quantisers.

7 years agotscc2: fix typo in DCT
Kostya Shishkov [Tue, 17 Jul 2012 15:34:58 +0000 (17:34 +0200)]
tscc2: fix typo in DCT

7 years agoconfigure: clarify external library section of help output
Diego Biurrun [Mon, 16 Jul 2012 16:19:13 +0000 (18:19 +0200)]
configure: clarify external library section of help output

7 years agoconfigure: mark libfdk-aac as nonfree
Diego Biurrun [Mon, 16 Jul 2012 23:32:01 +0000 (01:32 +0200)]
configure: mark libfdk-aac as nonfree

7 years agoconfigure: cosmetics: drop some unnecessary backslashes
Diego Biurrun [Mon, 16 Jul 2012 14:51:33 +0000 (16:51 +0200)]
configure: cosmetics: drop some unnecessary backslashes

7 years agoos_support: K&R formatting cosmetics
Diego Biurrun [Sun, 15 Jul 2012 20:12:30 +0000 (22:12 +0200)]
os_support: K&R formatting cosmetics

7 years agolibopenjpeg: introduce encoding support
Michael Bradshaw [Thu, 17 Nov 2011 23:57:09 +0000 (16:57 -0700)]
libopenjpeg: introduce encoding support

Based on FFmpeg version from
commit 713a7854e06964abc8f7d015b94acbed27769d24

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agolibopenjpeg: rename decoder source file.
Michael Bradshaw [Thu, 17 Nov 2011 14:39:16 +0000 (15:39 +0100)]
libopenjpeg: rename decoder source file.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agoRTMPTS protocol support
Samuel Pitoiset [Tue, 17 Jul 2012 10:02:43 +0000 (12:02 +0200)]
RTMPTS protocol support

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoRTMPS protocol support
Samuel Pitoiset [Tue, 17 Jul 2012 10:02:42 +0000 (12:02 +0200)]
RTMPS protocol support

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavconv: print an error message when demuxing fails.
Anton Khirnov [Sun, 15 Jul 2012 22:22:05 +0000 (00:22 +0200)]
avconv: print an error message when demuxing fails.

Also exit in such a case if -xerror is used.

Fixes bug 329.

7 years agotscc2: DCT output should not be clipped
Kostya Shishkov [Mon, 16 Jul 2012 18:14:37 +0000 (20:14 +0200)]
tscc2: DCT output should not be clipped

This fixes decoding some TSCC2 files with large quantisers.

7 years agortmp: Rename rtmphttp to ffrtmphttp
Samuel Pitoiset [Mon, 16 Jul 2012 09:56:20 +0000 (11:56 +0200)]
rtmp: Rename rtmphttp to ffrtmphttp

The prefix makes it easier to distinguish the proper end-user
protocols from the internal ones.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortmp: rtmp_parse_result() add case for video and audio packets to avoid undesired...
Jordi Ortiz [Tue, 3 Jul 2012 18:20:02 +0000 (18:20 +0000)]
rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agoconfigure: Move the getaddrinfo function check into the network block
Martin Storsjö [Sun, 15 Jul 2012 22:11:18 +0000 (01:11 +0300)]
configure: Move the getaddrinfo function check into the network block

This makes the two checks (general vs winsock) fit in better.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoconfigure: Remove an unused 'have' item
Martin Storsjö [Sun, 15 Jul 2012 22:00:21 +0000 (01:00 +0300)]
configure: Remove an unused 'have' item

This is only used for checking for a certain library, but the code
doesn't need to know whether the function was found.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agompeg: remove disabled code
Diego Biurrun [Fri, 29 Jul 2011 10:01:22 +0000 (12:01 +0200)]
mpeg: remove disabled code

7 years agolibfdk-aac: Check if cutoff value is valid
Mohammad Alsaleh [Sun, 15 Jul 2012 16:41:11 +0000 (19:41 +0300)]
libfdk-aac: Check if cutoff value is valid

Passing a cutoff value < sample_rate/256 will cause a crash.
Also, values >20000 will have no effect and 20000 will be used anyway.

Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agonetwork: Always use our version of gai_strerror on windows
Martin Storsjö [Mon, 25 Jun 2012 09:50:13 +0000 (12:50 +0300)]
network: Always use our version of gai_strerror on windows

Even if linking directly to getaddrinfo, use our version of
gai_strerror instead of the system's version. Microsoft explicitly
documents that their version of gai_strerror is thread-unsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agonetwork: Undefine existing gai_strerror definitions
Martin Storsjö [Mon, 18 Jun 2012 20:36:15 +0000 (23:36 +0300)]
network: Undefine existing gai_strerror definitions

This avoids warnings if there already exists a definition.

This is the case on windows, where the getaddrinfo isn't available
and linked to (and we use our fallbacks instead, which actually
try to use the proper getaddrinfo version if found at runtime),
but gai_strerror still exists as a define.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agonetwork: Extend the fallback gai_strerror implementation to handle more error codes
Martin Storsjö [Mon, 25 Jun 2012 09:44:18 +0000 (12:44 +0300)]
network: Extend the fallback gai_strerror implementation to handle more error codes

This is useful if a proper getaddrinfo is loaded dynamically on
windows, while using the fallback implementation of gai_strerror.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoconfigure: Check for CommandLineToArgvW
Ronald S. Bultje [Mon, 25 Jun 2012 05:43:14 +0000 (08:43 +0300)]
configure: Check for CommandLineToArgvW

The actual result of the check isn't used anywhere (since we
use this function unconditionally within #ifdef _WIN32), but it
makes sure we explicitly link to shell32 (which is linked in
implictly on mingw).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agovc1dec: Do not use random pred_flag if motion vector data is skipped
Mashiat Sarker Shakkhar [Sun, 15 Jul 2012 01:37:10 +0000 (07:37 +0600)]
vc1dec: Do not use random pred_flag if motion vector data is skipped

This fixes SA10143.vc1 from test-suite. Also partially fixes MC-VC1.ts
from videolan streams archive.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agovp8: Enclose pthread function calls in ifdefs
Martin Storsjö [Sat, 14 Jul 2012 21:11:35 +0000 (00:11 +0300)]
vp8: Enclose pthread function calls in ifdefs

This fixes building with threads disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agosnow: refactor code to work around a compiler bug in MSVC.
Ronald S. Bultje [Sat, 7 Jul 2012 16:06:50 +0000 (09:06 -0700)]
snow: refactor code to work around a compiler bug in MSVC.

This fixes the compiler error "cannot convert from 'BlockNode' to
'int16_t'".

7 years agovp8: Include the thread headers before using the pthread types
Martin Storsjö [Sat, 14 Jul 2012 21:19:44 +0000 (00:19 +0300)]
vp8: Include the thread headers before using the pthread types

This was unnoticed on linux, since stdlib.h apparently includes
files declaring the pthread_mutex_t and pthread_cond_t types.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoconfigure: Check for getaddrinfo in ws2tcpip.h, too
Ronald S. Bultje [Sun, 24 Jun 2012 19:22:29 +0000 (22:22 +0300)]
configure: Check for getaddrinfo in ws2tcpip.h, too

This function is only available in the headers if unconditionally
targeting a version >= XP. It is not strictly necessary, since we
try loading these functions dynamically at runtime on windows in
the fallback, but this makes things a bit faster and more
straightforward.

On mingw32, this function isn't visible by default, while it is
on mingw64 (on both 32 and 64 bit).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agovp8: implement sliced threading
Daniel Kang [Thu, 12 Jul 2012 20:07:06 +0000 (13:07 -0700)]
vp8: implement sliced threading

Testing gives 25-30% gain on HD clips with two threads and
up to 50% gain with eight threads.

Sliced threading uses more memory than single or frame threading.

Frame threading and single threading keep the previous memory
layout.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agovp8: move data from VP8Context->VP8Macroblock
Daniel Kang [Wed, 11 Jul 2012 18:34:05 +0000 (11:34 -0700)]
vp8: move data from VP8Context->VP8Macroblock

In preparation for sliced threading.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>