Commit Graph

33351 Commits

Author SHA1 Message Date
Mans Rullgard
4c387c7070 ppc: dsputil: do unaligned block accesses correctly
To load unaligned vector data in the usual way, explicit vec_ld()
should be used rather than dereferencing a pointer to a vector type.
When the VSX extension is enabled, gcc may compile vector pointer
dereferences using the VSX lxvw4x instruction instead of the lvx
instruction typically used with Altivec/VMX.  As the behaviour of
these instructions with unaligned addresses differs, it is important
that only lvx is used here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard
c75eca9d37 dvenc: do not call dsputil functions with stride not a multiple of 16
Allowing dsputil functions to assume the stride is a multiple of 16
even for smaller block sizes can simplify their implementation.
This appears to be the only place this guarantee is not met.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Justin Ruggles
f7ff099997 APIchanges: fill in some dates and commit hashes 2012-04-30 13:51:41 -04:00
Luca Barbato
0ca4642ec5 mkv: mark corrupted packets and return them
Do return error if memory allocation or I/O fails.
2012-04-29 20:22:09 -07:00
Luca Barbato
721af294d9 mkv: forward EMBL block data error
Do not return 0 on error.
2012-04-29 20:22:09 -07:00
Hendrik Leppkes
85395ba73f avcodec: introduce YCoCg colorspace
Non perceptual color model that aims to have an increase effectiveness
in compression like the normal YCbCr while having near-lossless/lossless
mapping to RGB.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-04-29 14:00:34 -07:00
Luca Barbato
ccc2dfbcdf avcodec: cosmetic cleanup on header
Apply coding style to the structs.
2012-04-29 13:30:40 -07:00
Ronald S. Bultje
b12bf03275 aac sbr: align struct member by 32 byte.
Required because it's used in a call to imdct_half(), which is an AVX
function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-29 13:49:39 -04:00
Mans Rullgard
acb2c79c21 4xm: fix invalid array indexing
Indexing outside arrays is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-29 01:08:37 +01:00
Christophe GISQUET
7fb8b491e5 rv34dsp: factorize a multiplication in the noround inverse transform
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:16:07 -07:00
Christophe Gisquet
d834ab0f2a rv40: perform bitwise checks in loop filter
Down from 95 kcycles to 93 (including all called functions).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:12:38 -07:00
Ronald S. Bultje
774b681b80 rv34: remove inline keyword from rv34_decode_block().
Force-inlining increases object size by 8kB and causes a 2% slowdown.
2012-04-28 11:10:57 -07:00
Christophe Gisquet
0195ab5f5f rv40: change a logical test into a bitwise one.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:09:32 -07:00
Christophe Gisquet
8802799991 rv34: remove constant parameter
is_block2 was always 0, so just remove it, and change accordingly the code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:07:50 -07:00
Christophe Gisquet
34e1b07546 rv40: don't always do the full prev_type search
120->100 cycles.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:06:05 -07:00
Christophe GISQUET
e75d1d4f73 dsputil x86: revert a test back to its previous value
Commit 356ee8d caused the initial inversion.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:00:51 -07:00
Christophe Gisquet
fe5ed69dc7 rv34dsp x86: implement MMX2 inverse transform
141 cycles down to 51.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 10:58:47 -07:00
Roland Scheidegger
9b9df1cdff h264: new assembly version of get_cabac for x86_64 with PIC
This adds a hand-optimized assembly version for get_cabac much like the
existing one, but it works if the table offsets are RIP-relative.
Compared to the non-RIP-relative version this adds 2 lea instructions
and it needs one extra register. get_cabac() gets about 40% faster, for
an overall speedup of about 5%.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 09:43:25 -07:00
Roland Scheidegger
14e9ffc1e4 h264: use one table instead of several for cabac functions
The reason is this is easier for PIC code (in particular on darwin...).
Keep the old names as pointers (static in cabac_functions.h so gcc
knows these are just immediate offsets) so the c code can nicely stay the same
(alternatively could use offsets directly in the functions needing the
tables). This should produce the same code as before with non-pic and better
code (confirmed) with pic.

The assembly uses the new table but still won't work for PIC case.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 08:26:12 -07:00
Roland Scheidegger
444f47b55c h264: (trivial) remove unneeded macro argument in x86/cabac.h
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 08:24:56 -07:00
Jordi Ortiz
a7fa5ce671 libschroedingerdec: check malloc
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-28 15:11:18 +02:00
Luca Barbato
3b52e9da10 segment: reorder seg_write_header allocation
As pointed by Paul B Mahol <onemda@gmail.com> the previous code could
lead to null pointer dereference.
2012-04-27 14:03:43 -07:00
Luca Barbato
e1e146a2d1 avio: make avio_close(NULL) a no-op
Its behaviour in line with ffurl_close(NULL).
2012-04-27 14:03:43 -07:00
Yusuke Nakamura
546adc1fee mov: Parse EC3SpecificBox (dec3 atom).
Skip to parse fields for additional independent substreams and its
associated dependent substreams since libavcodec's E-AC-3 decoder does not
support them yet.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-27 16:11:46 -04:00
Martin Storsjö
df8aa4598c mpegts: Make sure we don't return uninitialized packets
This fixes crashes, where the demuxer could return 0 even
if the returned AVPacket isn't initialized at all. This
could happen if running into EOF or running out of probesize
with non-seekable sources.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-27 20:05:37 +03:00
Diego Biurrun
1b4f085772 gitignore: replace library catch-all pattern by more specific patterns
Ignoring all files that start with the name of a library matches some
files that are not generated.  So replace libfoo/libfoo* with patterns
for static and shared libraries, pkg-config and version files.
2012-04-27 13:01:11 +02:00
Mans Rullgard
0a07f2b346 dsputil: fix invalid array indexing
Indexing outside an array is invalid and causes errors with
gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-26 17:07:43 +01:00
Sean McGovern
3510a13307 configure: add libavresample to rpath
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-26 11:25:23 +01:00
Mans Rullgard
88de5b0a73 build: icc: silence some warnings
This disables the warning "external declaration in primary source file"
which is issued when a prototype for an extern function is found in a
.c file rather than a header file.  We have such prototypes for asm
functions where a separate header file would be pointless.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard
b6a6e90a7c fft-test: add option to set cpuflag mask
This can be useful for testing.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard
6eca84bad8 cpu: recognise only cpu flag names pertinent to the architecture
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard
3527a73933 avutil: add av_parse_cpu_flags() function
This moves the cpu flag parsing code from avconv to avutil so
it can be accessed elsewhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard
3d11c2d76d vp8: armv6: fix non-armv6t2 build
The assembler may fail to place literal pools close enough to
instructions referencing them.  An explicit .ltorg directive
fixes this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:16:31 +01:00
Mans Rullgard
e4ac031233 vp8: armv6 optimisations
Based on patch by Ronald S. Bultje <rsbultje@gmail.com>,
partially ported from libvpx.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Mans Rullgard
b692d246ea vp8: arm: separate ARMv6 functions from NEON
This is a preparation for complete ARMv6 optimisations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Mans Rullgard
dac78fd1d7 ARM: add some compatibility macros
This adds some macros simplifying Thumb and pre-v6T2 compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Hendrik Leppkes
949d942eef mov: support eac3 audio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-25 15:24:14 -04:00
Luca Barbato
8b97ae6484 avf: fix faulty check in has_duration
An invalid duration is AV_NOPTS_VALUE not 0.
2012-04-25 11:40:22 -07:00
Justin Ruggles
394dbde548 FATE: use updated reference for aac-latm_stereo_to_51
This uses correct stereo to 5.1 upmixing via libavresample.
2012-04-24 23:38:54 -04:00
Justin Ruggles
bcb82fe1f4 avconv: use libavresample 2012-04-24 23:38:54 -04:00
Justin Ruggles
c8af852b97 Add libavresample
This is a new library for audio sample format, channel layout, and sample rate
conversion.
2012-04-24 21:28:27 -04:00
Justin Ruggles
c5671aeb77 FATE: avoid channel mixing in lavf-dv_fmt
This partially reverts acb1730218
which would only have needed to change the checksums if channel mixing had
been properly avoided. This changes the output file size reference and the
seek test reference back to the previous values.
2012-04-24 15:55:45 -04:00
Anton Khirnov
8c4022aceb avconv: fix a segfault on -c copy with -filter_complex. 2012-04-24 06:30:02 +02:00
Yusuke Nakamura
462a5b7839 isom: Support more DTS codec identifiers.
DTS LBR identifier ('dtse') is not included since libavcodec doesn't support it yet.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-23 14:47:17 -04:00
Dale Curtis
7521c4bab2 matroska: Clear prev_pkt between seeks.
The new incremental parser doesn't always clear prev_pkt,
however the packet queue is cleared when seeking. Which leads
to a use-after-free.

Verified using Valgrind.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-23 14:21:42 -04:00
Justin Ruggles
83b26046fc avutil: change default buffer size alignment for sample buffer functions
Aligning nb_samples will give both correct plane pointer alignment and enough
padding for SIMD-optimized functions.
2012-04-23 14:06:45 -04:00
Michael Niedermayer
0ca4414d0f audemux: Add a sanity check for the number of channels
Fixes a division by 0.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-23 10:47:38 +03:00
Diego Biurrun
a229d6c285 Remove libdirac decoder.
libschroedinger is the preferred way to decode Dirac video.
2012-04-23 09:20:24 +02:00
Dale Curtis
8336eb6f85 matroska: Add incremental parsing of clusters.
Reduces the amount of upfront data required for cluster parsing
thus decreasing latency on seek and startup.

The change in the seek-lavf_mkv FATE test is due to incremental
parsing no longer reading as much data as the old parser and
thus not having that additional data to generate index entries
based on keyframes.  Index entries are added correctly as the
file is parsed.

All FATE tests pass and Chrome has been using this patch for ~6
months without issue.

Currently incremental parsing is not supported for files with
SSA tracks since they require merging packets between clusters.
In this case the code falls back to non-incremental parsing.

Signed-off-by: Aaron Colwell <acolwell@chromium.org>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-04-22 17:23:50 -07:00
Luca Barbato
1381081cdb avconv: fix off by one check in complex_filter
nb_input_files is already an invalid index.
2012-04-22 17:23:50 -07:00