1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-21 00:35:05 +02:00
Commit Graph

40207 Commits

Author SHA1 Message Date
Michael Niedermayer
73edb58c3c swr: float_to_int16_sse2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-29 12:18:14 +02:00
Michael Niedermayer
5932938c9a swr: float_to_int32_sse2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-29 11:37:32 +02:00
Michael Niedermayer
9d7c1b4cf3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: new assembly version of get_cabac for x86_64 with PIC
  h264: use one table instead of several for cabac functions
  h264: (trivial) remove unneeded macro argument in x86/cabac.h
  libschroedingerdec: check malloc
  segment: reorder seg_write_header allocation
  avio: make avio_close(NULL) a no-op
  mov: Parse EC3SpecificBox (dec3 atom).

Conflicts:
	libavcodec/cabac.c
	libavcodec/x86/cabac.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 20:45:06 +02:00
Nicolas George
c31be45e14 lavc: minor bump for the new fields in AVFrame. 2012-04-28 20:32:40 +02:00
Nicolas George
128dda7016 lavc: add a sample_rate field to AVFrame.
The field is filled with the codec context information.
2012-04-28 20:14:48 +02:00
Nicolas George
4b0521eca9 lavc: add a channel_layout field to AVFrame.
The field is filled with the codec context information.

FIXME need a minor version bump.
2012-04-28 20:14:48 +02:00
Roland Scheidegger
82c71913e4 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.
There is a surprisingly large performance improvement over the c version (more
so than the generated assembly seems to suggest) just in get_cabac, I measured
roughly 40% faster for get_cabac on a K8. However, overall the difference is
not that big, I measured roughly 5% on a test clip on a K8 and a Core2.
Hopefully it still compiles on x86 32bit...
Now that only one table is used, there's some chance even darwin as compiles
this (apparently the label arithmetic used previously doesn't work if it
involves symbols defined in a different file, thanks to Ronald S. Bultje for
helping me with this).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 20:02:27 +02:00
Roland Scheidegger
7f668cd2b5 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: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 20:02:27 +02:00
Roland Scheidegger
e52b96187b h264: (trivial) make ff_h264_lps_state static
not used outside the cabac test functions (which probably means it's
a bad test if it doesn't use the same tables as the real functions?)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 20:02:27 +02:00
Roland Scheidegger
5520df6a8f h264: (trivial) remove unneeded macro argument in x86/cabac.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 20:02:27 +02:00
Nicolas George
f1b82099cd src_buffer: add forgotten avfilter_unref_buffer. 2012-04-28 19:37:57 +02:00
Michael Niedermayer
b72a0f9c23 swr: add int16_to_float_sse2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 19:07:30 +02:00
Jean First
64943b47e7 lavf remove duplicated check in has_duration
this hunk was merged in 8b97ae64 and cbf767a8 although the check was there a
few lines above since cdced09e. I removed the first check to reduce the differences
to libav.

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 19:07:30 +02:00
Nicolas George
75d5624cb2 avfilter: filter_samples: read pts before filtering.
The call to the next filter_sample will likely unref the
current buffer, so it is not possible to read it afterwards.
2012-04-28 18:48:12 +02: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
Michael Niedermayer
832c3b10d2 swr: add int32_to_float_sse2
could be done for sse/3dnow too if someone wants

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 17:06:11 +02:00
Michael Niedermayer
95057b1972 swr: int16->int32: use the old index negate trick to avoid 2 adds
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 17:06:11 +02:00
Michael Niedermayer
113738d6c2 swr: more correct cglobal parameters to int16->int32
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 17:06:11 +02:00
Nicolas George
12eeced8b4 avio: change ffurl_alloc return code.
If the designated protocol is not found, return
AVERROR_PROTOCOL_NOT_FOUND instead of AVERROR(ENOENT).
2012-04-28 16:39:54 +02:00
Jordi Ortiz
a7fa5ce671 libschroedingerdec: check malloc
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-28 15:11:18 +02:00
Michael Niedermayer
fa5daaca0d swr: seperate functions for aligned & unaligned
If someone has an idea on how to do this cleaner, its welcome

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 13:15:44 +02:00
Michael Niedermayer
bcc66ff0e4 swr: add int16_to_int32_mmx/sse
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 13:15:44 +02:00
Michael Niedermayer
06b62cb8f2 swr: move AudioConvert to header
the next commits will need it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 13:02:58 +02:00
Michael Niedermayer
edbde52226 swr: change sample format representation so as to maintain the planer/packed distinction.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 13:02:58 +02:00
Reimar Döffinger
9d4a1aca88 Fix compilation with YASM/NASM without AVX support.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-28 13:01:49 +02:00
Nicolas George
a0a0199da3 examples/filtering_audio: do not stop on decode error.
Decode errors can happen with concatenated MP3s
with different formats.
2012-04-28 10:28:15 +02:00
Nicolas George
8f19483d06 examples/filtering_audio: fix a memory leak. 2012-04-28 10:28:15 +02:00
Nicolas George
2ae5af8094 lavfi: rename vsrc_buffer.c into src_buffer.c. 2012-04-28 09:59:13 +02:00
Nicolas George
7ad0d9864e lavfi: merge asrc_abuffer into vsrc_buffer. 2012-04-28 09:59:13 +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
Michael Niedermayer
28c5775183 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegts: Make sure we don't return uninitialized packets
  gitignore: replace library catch-all pattern by more specific patterns

Conflicts:
	.gitignore

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-27 22:44:52 +02:00
Stefano Sabatini
18c6bd098b lavfi/tinterlace: remove unnecessary NULL check in start_frame() 2012-04-27 22:45:11 +02:00
Stefano Sabatini
cf9f7e40cc lavfi/tinterlace: use avfilter_unref_bufferp() 2012-04-27 22:45:11 +02:00
Stefano Sabatini
a853e88af2 lavfi/tinterlace: fix doxy in copy_picture_field() 2012-04-27 22:45:10 +02: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
Matthieu Bouron
73c1e3baad asrc_abuffer: return EAGAIN if no frame is available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-27 22:11:00 +02:00
Stefano Sabatini
6b55aab01a lavfi: create buffer reference in filters which need to access the ref later
Also add internal function ff_null_start_frame_keep_ref().

Fix crash when a following filter (e.g. settb) will unref the reference
passed by start_frame(), and then the reference is accessed in
end_frame() through inlink->cur_buf.
2012-04-27 21:38:13 +02:00
Stefano Sabatini
6f3b1d7f86 lavfi/bbox: add missing space between pts and x1 values in the log 2012-04-27 21:33:42 +02:00
Clément Bœsch
423b827668 lavc: add MicroDVD decoder.
Based on my MicroDVD->ASS conversion code from MPlayer
(sub/subassconvert.c).
2012-04-27 19:39:19 +02:00
Clément Bœsch
e40981b8c4 lavf/microdvd: set packet duration. 2012-04-27 19:19:36 +02: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
Nicolas George
3e1d3ebf5e parseutils: replace setenv() by putenv().
putenv() seems to be more portable.
2012-04-27 18:16:04 +02: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
Michael Niedermayer
dcfc12e86a swr-test: simplify prng code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-27 12:23:53 +02:00
Nicolas George
e5474f5c48 doc: fix syntax for durations and timestamps.
Omitting the seconds has not worked for a long time, if ever.
Omitting the minutes too is just nonsensical for a duration
(it is indistinguishable from just seconds).
2012-04-27 11:04:51 +02:00
Michael Niedermayer
bbd3dc49ff swr: unroll audioconvert core C function
36k->32k decicycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-27 05:05:20 +02:00
Michael Niedermayer
4119fa7023 swr: audioconvert, mark some constants as floats.
idea from avr

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-27 00:22:57 +02:00