Commit Graph

13045 Commits

Author SHA1 Message Date
Justin Ruggles
626264b11b ac3enc: Remove unneeded clipping of shift amount.
s->windowed_samples will always have a range of [-32767,32767] due to the
window function, so the return value from log2_tab() will always be in the
range [0,14].

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 23:16:23 +00:00
Justin Ruggles
d4582889ee ac3enc: remove right shifting from lshift_tab() and make lshift unsigned.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 23:16:22 +00:00
Mans Rullgard
44adbebe17 Remove final semicolon from some macros
This avoids double semicolons after macro expansion.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 21:45:17 +00:00
Ronen Mizrahi
df211c3ab7 dvbsubenc: Fix placement of the object version
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 21:45:17 +00:00
Janne Grunau
493aa30adf dvbsubdec: check against buffer overreads
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-10 21:37:31 +01:00
Reimar Döffinger
4a72765a1c Do not fail DVB sub decoding because of a few padding bytes
Instead of returning an error when bytes are left over, just return
the number of actually used bytes as other decoders do.
Instead add a special case so an error will be returned when none
of the data looks valid to avoid making debugging a pain.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-10 21:37:31 +01:00
Justin Ruggles
dda3f0ef48 Add x86-optimized versions of exponent_min().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 15:32:47 -05:00
Mans Rullgard
b4668274b9 Remove incorrect return statement from avcodec_thread_free()
The function return type is void, so a return statement with an
expression is forbidden (and pointless).

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 14:17:24 +00:00
Mans Rullgard
dbb09ec23f ivi_dsp: remove semicolons after function definitions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 14:17:24 +00:00
Mans Rullgard
9a77a92c2b Fix build with threading disabled
The avcodec_thread_free() compatibility wrapper calls ff_thread_free(),
which is not defined when threading is disabled.  Make this call
conditional.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-09 20:52:28 +00:00
Mans Rullgard
aef669cdfd w32thread: add missing #include thread.h
This should fix building with win32 threads.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-09 20:52:28 +00:00
Reimar Döffinger
2cfa2d9258 check sample_fmt in avcodec_open
check AVCodecContext->sample_fmt against AVCodec->sample_fmts[] to ensure
that the encoder supports the specified sample format. Error out if it doesn't.
Previously, it would continue and output garbage. Fixes issue 2587.
2011-02-09 15:30:53 -05:00
Alexander Strange
d23845f311 vp3: Frame-based multithreading support
Decode times for big_buck_bunny_720p_stereo:

1 thread:
real    1m14.227s
user    1m13.104s
sys     0m1.108s

2 threads: (33% faster)
real    0m49.329s
user    1m33.735s
sys     0m1.834s

3 threads: (44% faster)
real    0m41.593s
user    1m44.884s
sys     0m1.967s
2011-02-09 09:17:29 -05:00
Alexander Strange
c0b102ca03 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Alexander Strange
37b00b47cb Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Jason Garrett-Glaser
c7ac200d15 Update qmin/qmax values for libx264 presets
Also allow qmin/qmax to go up to 69 (the current max value for libx264).  This
will have to increase when we add 9/10-bit support.
2011-02-08 15:59:30 -08:00
Jason Garrett-Glaser
f7f8120fb9 Fix broken vbv_buffer_init handling in libx264.c
Due to being pants-on-head retarded, libavcodec defaults this to zero, which
results in broken output.  This didn't affect ffmpeg.c, which sets it itself,
but caused problems for other calling apps using VBV.
2011-02-08 15:59:27 -08:00
Jason Garrett-Glaser
62457f9052 VP8: idct_mb optimizations
Currently uses AV_RL32 instead of AV_RL32A, as the latter doesn't exist yet.
2011-02-08 15:59:24 -08:00
Ronald S. Bultje
17cf7c68ed Fix ff_emu_edge_core_sse() on Win64.
Fix emu_edge_v_extend_15 to be <128 bytes on Win64, by being more strict
on the size of registers and which registers are being used for operations
where multiple are available. This fixes segfaults in emulated_edge()
function calls on Win64.
2011-02-08 18:25:12 -05:00
Stefan Kost
ae2104791f logging: downgrade recoverable errors to warnings
In all 3 cases, the decoding continues and thus a warning would be sufficient.
Helps application that catch them with own log handers to handle them
accordingly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-08 17:49:35 +00:00
Janne Grunau
440b61691d h264: define FF_PROFILE_H264_HIGH_444 to the correct value
It was removed in fe9a3fb since it had the wrong value. Add profile name
for it.
2011-02-08 13:20:56 +01:00
Mans Rullgard
a1c1d3c003 VP8: ARM NEON optimisations for dsp functions
This adds NEON optimised versions of all functions in VP8DSPContext.
Based on initial work by Rob Clark.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-07 16:08:23 +00:00
Jindrich Makovicka
5bea615dc3 dvbsubdec: pass correct input buffer size
In some places, dvbsubdec passes improper input buffer size to
bitstream reading functions, not accounting for reading pointer
updates.

Fixed by using buffer_end - buffer pointer instead of fixed buffer length.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-07 14:21:36 +00:00
Kostya
90e8a9c34f Remove Xan WC4 cruft from xan.c
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-07 08:06:16 -05:00
Kostya Shishkov
44ddfd47d6 Xan4 decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-07 08:03:22 -05:00
Sascha Sommer
ed19fafd48 pass QDMC extradata to the decoder
Makes playing QDMC files in MPlayer work when using the libavformat demuxer.
Problem was that the extradata was not passed from demuxer to decoder.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 16:05:55 -05:00
Diego Elio Pettenò
84ae8936f6 Make inter_rvlc and intra_rvlc static tables.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 09:53:33 -05:00
Anton Khirnov
c2fcd0a7a4 Replace remaining occurrences of deprecated CH_* with AV_CH_*
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 08:26:12 -05:00
Kieran Kunhya
f4a86bc981 Set channel_layout for mpegaudio
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:25:02 -05:00
Alexander Strange
edbb0c0708 vp3: Move table allocation code into a new function
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:00:57 -05:00
Alexander Strange
e8dcd73058 vp3: Factor out expression
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 19:57:01 -05:00
Jason Garrett-Glaser
8a2c99b486 VP8: slightly faster loopfilter sharpness logic 2011-02-04 04:51:22 -08:00
Jason Garrett-Glaser
79dec1541b VP8: faster deblock strength calculation
Convert hev_thresh logic to a LUT, simplify mbedge_lim calculation.
2011-02-04 04:51:18 -08:00
Clément Bœsch
523d9407d5 Remove a few if (p) av_freep(&p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 10:00:49 +00:00
Jason Garrett-Glaser
a1b227bb53 VP8: faster filter_level clip 2011-02-03 19:55:06 -08:00
Jason Garrett-Glaser
dd18c9a050 VP8: simplify lf_delta mb mode logic 2011-02-03 19:55:02 -08:00
Anton Khirnov
151595fe2e Rename remaining occurrences of SAMPLE_FMT_* to AV_SAMPLE_FMT_*
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 13:38:10 +00:00
Anton Khirnov
b2ed95ec48 Replace remaining occurrences of CODEC_TYPE_* with AVMEDIA_TYPE*
Tested to compile with lavc major bump.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 13:37:09 +00:00
Tomas Härdin
f5b82f45dc Add CODEC_ID_PRORES and bump lavc minor version
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 11:38:09 +00:00
Clément Bœsch
437fb1c87d Remove a few if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 01:37:55 +00:00
Nicolas George
62ecd3635a Set pkt_pts in avcodec_default_reget_buffer()
This was missed when pkt_pts was first added.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 00:25:35 +00:00
Justin Ruggles
c3beafa0f1 ac3enc: Change EXP_DIFF_THRESHOLD to 500.
This patch changes the exponent difference threshold in the exponent
strategy decision function of the AC-3 encoder.  I tested lowering in
increments of 100.  From 1000 down to 500 generally increased in quality
with each step, but 400 was generally much worse.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-02 20:00:43 +00:00
Mans Rullgard
b9a639ddd6 ARM: add helper macro for declaring constant data
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-02 11:35:51 +00:00
Justin Ruggles
c73d99e672 Separate format conversion DSP functions from DSPContext.
This will be beneficial for use with the audio conversion API without
requiring it to depend on all of dsputil.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-02 02:44:53 +00:00
Alex Converse
770c410fbb Fix ff_imdct_calc_sse() on gcc-4.6
Gcc 4.6 only preserves the first value when using an array with an "m"
constraint.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-02 02:40:05 +00:00
Anssi Hannula
71e0bee9ea h264: add profile names for the existing defines
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-01 20:37:02 +01:00
Janne Grunau
fe9a3fbe42 h264: Add Intra and Constrained Baseline profiles to avctx.profile 2011-02-01 20:37:02 +01:00
Gianluigi Tiesi
e86e858111 dca: avoid C99 declaration in for() expression
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-01 12:38:30 +00:00
Jason Garrett-Glaser
64233e702a VP8: merge chroma MC calls
Adds some duplicated code, but avoids duplicate edge checks and similar.
~0.5% faster overall on Parkjoy test sample.
2011-01-31 20:46:54 -08:00
Ronald S. Bultje
81f2a3f4ff Implement a SIMD version of emulated_edge_mc() for x86.
From ~550 cycles (C version) to 170 (SSE/x86-64), 206 (MMX/x86-32)
and 196 (SSE2/x86-32) cycles.
2011-01-31 20:55:56 -05:00