Commit Graph

35773 Commits

Author SHA1 Message Date
Mans Rullgard 4a606c830a av_memcpy_backptr: optimise some special cases
- Add special cases for offsets of 2, 3, or 4 bytes.  This means the
  offset is always >4 in the generic case, allowing 32-bit copies to
  be used there.
- Don't use memcpy() for sizes less than 16 bytes.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:04:17 +00:00
Mans Rullgard 5e39bb073a mpegvideo: simplify dxy calculation in hpel_motion()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:03:54 +00:00
Mans Rullgard c262649291 build: add rules to generate preprocessed source files
This is useful for debugging.  Dependencies for these files are not
generated due to limitations in many compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:03:32 +00:00
Anton Khirnov 9ae80e6a9c id3v2: fix reading unsynchronized frames.
Current code would incorrectly process e.g. 'ff 00 ff 00 ff' to
'ff ff ff', while it should be 'ff ff 00 ff'.

Fixes Bug 395.

CC: libav-stable@libav.org
2012-11-22 13:40:04 +01:00
Xi Wang 0d3123666a cdgraphics: fix incorrect vertical offset mask in cdg_scroll()
The vertical offset mask 0x07 is suspicious.

    v_off = FFMIN(data[2] & 0x07, CDG_BORDER_HEIGHT - 1);

Note that v_off is up to 11 (CDG_BORDER_HEIGHT - 1), the correct mask
should be 0x0F.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-21 14:35:26 +01:00
Xi Wang b655cfefaf apetag: fix error handling in ff_ape_parse_tag()
The following error handling is broken due to signedness.

    int file_size;
    uint32_t tag_bytes;
    int64_t tag_start;
    ...
    tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES;
    if (tag_start < 0) { ... }

Note that tag_bytes is unsigned, which makes the right-hand side of
`tag_start = ...' unsigned, too.  The 32-bit unsigned value is then
zero-extended to 64 bits.  Therefore, tag_start must be non-negative,
and the check (tag_start < 0) is always false, which breaks the error
handling.  This patch fixes the check.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-21 14:35:26 +01:00
Diego Biurrun 17fecb4a59 flashsv: Drop unused function and struct parameters 2012-11-21 11:49:41 +01:00
Justin Ruggles 00dd9a6d6a pcm: fix decoding of pcm_s16le_planar on big-endian
The sample count is decremented by the DECODE() macro and needs to be reset
in each loop iteration. Also, DECODE() increments the src pointer so that does
not need to be done separately.
2012-11-20 10:52:49 -05:00
Luca Barbato ae3822bca1 imgconvert: remove PixFmtInfo
It is pleonastic and was used in stale functions pending replacement.
2012-11-20 12:45:58 +01:00
Luca Barbato d1d9efaae6 avcodec: split avpicture from imgconvert
All the non deprecated functions are in avpicture.c now.
2012-11-20 12:45:58 +01:00
Luca Barbato cbe5a60c9d pixdesc: add PIX_FMT_ALPHA flag 2012-11-20 12:45:58 +01:00
Justin Ruggles b353321caa FATE: add 24-bit ALAC tests 2012-11-20 00:26:46 -05:00
Justin Ruggles 3e6c2a67a1 FATE: rename ALAC tests from alac-* to alac-16-*
This will distinguish ALAC 16-bit tests from ALAC tests with other bit
depths.
2012-11-20 00:26:45 -05:00
Justin Ruggles 7c278d2ae4 alacenc: support 24-bit encoding 2012-11-20 00:26:45 -05:00
Justin Ruggles c9d0f4506f pcmdec: use planar sample format for pcm_s16le_planar 2012-11-19 23:48:37 -05:00
Justin Ruggles 79b7747556 vorbisdec: use float planar sample format 2012-11-19 23:48:37 -05:00
Diego Biurrun 89923fce70 x86: h264_intrapred: Fix C function names in comments
Function names changed after switching to declaration with
PRED4x4/8x8/8x8L/16x16 macros in the C code.
2012-11-18 18:34:05 +01:00
Diego Biurrun 87af05c575 x86: SPLATD: port to cpuflags 2012-11-18 18:34:05 +01:00
John Stebbins 1c5805521c PGS subtitles: Set AVSubtitle pts value
pts should be that of the packet containing the presentation segment.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-18 18:34:05 +01:00
Diego Biurrun 3bd1eacd2a configure: Refactor CPPFLAGS settings for glibc/uclibc
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-18 12:00:18 +00:00
Mans Rullgard 5873b623a9 configure: add basic support for ARM AArch64
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-18 12:00:18 +00:00
Mans Rullgard 8f7b814f54 build: set -U__STRICT_ANSI__ for newlib
This is (erroneously) required to enable various things in the
newlib headers.  As cygwin uses newlib, it is covered by this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-18 12:00:17 +00:00
Ronald S. Bultje 7a9e65acee x86: lavr: fix stack allocation for 7 and 8 channel downmixing on x86-32
Fixes crashes on Win32 and stack overruns on x86-32 in general.
2012-11-17 20:16:04 -05:00
Justin Ruggles 02738792c5 lavr: fix the decision for writing directly to the output buffer
If there are any samples remaining in the output fifo from previous conversion
calls, we have to output those samples first instead of doing direct output
of the current samples.
2012-11-17 20:09:40 -05:00
Mans Rullgard 5af530f5a9 parisc: work around bug in gcc 4.3 and later
A bug in tail call optimisation in gcc 4.3 and later on parisc causes
numerous tests to fail.  Disabling this optimisation gives a working
build.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55023

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-17 17:54:28 +00:00
Anton Khirnov da5408ede9 FATE: add a bink version 'b' test 2012-11-17 08:45:47 +01:00
Anton Khirnov 108bfe4e43 FATE: add a bink version 'i' test 2012-11-17 08:45:47 +01:00
Janne Grunau 80716953c2 libswscale: remove unnecessary direct #if LIBSWSCALE_VERSION_MAJOR
SWS_CPU_CAPS are deprecated and slated to removed with libswscale major
version 3. No need to provide a SWS_CPU_CAPS_MMX2 as backward
compatibility define under the same explicit condition.
2012-11-16 15:04:57 +01:00
Janne Grunau 8f5587c3d0 cpu.h: define AV_CPU_FLAG_MMX2 for libavutil major 52 2012-11-16 15:04:48 +01:00
Janne Grunau e6160bda98 h264: Fix parameters to ff_er_add_slice() call
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.

CC: libav-stable@libav.org
2012-11-16 13:18:28 +01:00
Janne Grunau 60b6b8c019 h264: always check ref_count for validity
Fixes a crash with zuffed files.
2012-11-16 13:18:28 +01:00
Diego Biurrun 8c3849bc76 x86: dsputil: port to cpuflags 2012-11-16 10:38:23 +01:00
Diego Biurrun 8ff0f7763d crc: av_crc() parameter names should match between .c, .h and doxygen 2012-11-16 10:38:23 +01:00
Janne Grunau 566de8cde2 avserver: replace av_read_packet with av_read_frame 2012-11-15 18:04:53 +01:00
Janne Grunau 39c4afd926 avserver: fix constness casting warnings
Use a different char* for extracting info string from the URL. The
other pointer can be made const then which elimates the need for a
cast and fixes the following warnings:
warning: to be safe all intermediate pointers in cast from ‘char **’ to
‘const char **’ must be ‘const’ qualified [-Wcast-qual]
2012-11-15 18:04:53 +01:00
Janne Grunau bf5f46b4cc APIChanges: add entry for av_read_packet deprecation 2012-11-15 17:49:53 +01:00
Janne Grunau c84cce5a99 mxfdec: fix typo in mxf_read_seek()
Check the number of index tables before using byte offset based seeking
instead of the index_tables pointer.

Found by Måns Rullgård <mans@mansr.com>.
2012-11-15 17:37:09 +01:00
Janne Grunau a4cd2ad89a avserver: use freopen to redirect stdin/out/err to /dev/null 2012-11-15 17:36:38 +01:00
Mans Rullgard ada51a334a avserver: remove daemon mode
This code spews a multitude of warnings with glibc (unchecked
return values), some of them possibly warranted.  Furthermore,
the deamonisation is not suitable for use with typical startup
scripts as it does not provide the PID of the daemon in any way.
Users wishing to run avserver as a daemon can still do so using
start-stop-daemon or equivalent tools.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-11-15 17:36:14 +01:00
Martin Storsjö 9eded0fe41 configure: Check for -Werror parameters on clang
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-15 18:22:03 +02:00
Janne Grunau 116ae7285e doxygen: remove obsolete options from Doxyfile
The options USE_INLINE_TREES, SHOW_DIRECTORIES and HTML_ALIGN_MEMBERS
became obsolete with doxygen 1.8.1 (releaded 2012-05-19). The generated
outpu for older doxygen versions should not change since they were set
to the default value.
2012-11-15 17:18:37 +01:00
Diego Biurrun e28b7553ae configure: Add option to disable all command line programs 2012-11-14 23:03:36 +01:00
Xi Wang b74dbdd5e9 bgmc: Fix av_malloc checks in ff_bgmc_init()
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-14 23:03:36 +01:00
Luca Barbato 8034130e06 rtp: set the payload type as stream id
Support multiple video/audio streams with different format in the
same session.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-11-14 20:38:51 +01:00
Luca Barbato 3b4296f414 avformat: clarify stream id for muxing 2012-11-14 20:38:51 +01:00
Diego Biurrun a3138ebfa8 fate: Add dependencies for aac, alac, amrnb, amrwb, atrac tests 2012-11-14 15:09:59 +01:00
Mans Rullgard 7f1fcaf0e6 ppc: do not pass redundant compiler flags
The -mpowerpc64 and -mpowerpc-gfxopt flags are implicitly set by
-mcpu as needed.  Passing them explicitly is redundant and can
conflict with user-supplied flags.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-14 13:50:43 +00:00
Mans Rullgard 7ba0c1b390 avutil: change GET_UTF8 to not use av_log2()
This removes an inter-library dependency on ff_log2_tab causing
linking errors in some configurations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-14 13:50:42 +00:00
Xi Wang e8769b37fe segment: fix NULL pointer dereference in seg_write_header()
Since the pointer `oc' is NULL, oc->oformat->name will cause a null
pointer dereference.  This patch changes it to seg->oformat->name.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-14 12:33:27 +02:00
Diego Biurrun 26301caaa1 x86: mmx2 ---> mmxext in asm constructs 2012-11-14 00:58:51 +01:00