Commit Graph

13145 Commits

Author SHA1 Message Date
Reimar Döffinger
20708223db 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>
(cherry picked from commit 4a72765a1c)
2011-02-11 02:54:09 +01:00
Justin Ruggles
a30ac54a19 Add x86-optimized versions of exponent_min().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit dda3f0ef48)
2011-02-11 02:54:09 +01:00
Mans Rullgard
952f231588 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>
(cherry picked from commit b4668274b9)
2011-02-11 02:54:09 +01:00
Mans Rullgard
7e1e8bf335 ivi_dsp: remove semicolons after function definitions
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit dbb09ec23f)
2011-02-11 02:54:09 +01:00
Mans Rullgard
ee5bb31f99 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>
(cherry picked from commit 9a77a92c2b)
2011-02-11 02:54:08 +01:00
Mans Rullgard
74711b72cc w32thread: add missing #include thread.h
This should fix building with win32 threads.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit aef669cdfd)
2011-02-11 02:54:08 +01:00
Reimar Döffinger
7ade06cc2e 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.
(cherry picked from commit 2cfa2d9258)
2011-02-11 02:54:08 +01:00
Alexander Strange
4a5a16898f 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
(cherry picked from commit d23845f311)
2011-02-11 02:54:08 +01:00
Alexander Strange
043d2ff267 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>
(cherry picked from commit c0b102ca03)
2011-02-11 02:54:08 +01:00
Alexander Strange
b38f008ea6 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-11 02:53:58 +01:00
Jason Garrett-Glaser
a97b9325cb 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.
(cherry picked from commit c7ac200d15)
2011-02-09 03:33:56 +01:00
Jason Garrett-Glaser
2c855cea85 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.
(cherry picked from commit f7f8120fb9)
2011-02-09 03:33:55 +01:00
Jason Garrett-Glaser
a1b0a3c8bd VP8: idct_mb optimizations
Currently uses AV_RL32 instead of AV_RL32A, as the latter doesn't exist yet.
(cherry picked from commit 62457f9052)
2011-02-09 03:33:55 +01:00
Ronald S. Bultje
a239d534d7 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.
(cherry picked from commit 17cf7c68ed)
2011-02-09 03:33:55 +01:00
Stefan Kost
3e2a4e91bd 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>
(cherry picked from commit ae2104791f)
2011-02-09 03:33:54 +01:00
Janne Grunau
154f7bb062 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.
(cherry picked from commit 440b61691d)
2011-02-09 03:33:54 +01:00
Mans Rullgard
ef15d71c1f 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>
(cherry picked from commit a1c1d3c003)
2011-02-09 03:31:21 +01:00
Kostya
fff6c21295 Remove Xan WC4 cruft from xan.c
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 90e8a9c34f)
2011-02-09 03:31:18 +01:00
Kostya Shishkov
abb5f2b7bf Xan4 decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 44ddfd47d6)
2011-02-09 03:31:18 +01:00
Sascha Sommer
e11afd71a3 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>
(cherry picked from commit ed19fafd48)
2011-02-09 03:30:01 +01:00
Alexander Strasser
21b032c431 vorbis dec: Remove obsolete comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-08 21:26:39 +01:00
Alexander Strasser
350b2bb1a6 vorbis dec: cosmetics: Indent CPP cond properly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-08 21:26:39 +01:00
Alexander Strasser
6d173daece vorbis dec: cosmetics: Indent consistently
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-08 21:26:39 +01:00
Alexander Strasser
b2a51e3d48 vorbis dec: cosmetics: Indent after scope deletion
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-08 21:26:38 +01:00
Alexander Strasser
21494e5537 vorbis dec: Delete useless scopes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-08 21:26:38 +01:00
Nicolas George
76ad67cae7 Implement guessed_pts in avcodec_decode_video2
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-07 19:32:07 +01:00
Jindrich Makovicka
52b2e95cd9 dvdsubdec.c: prevent input buffer overflow
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: Michael Niedermayer <michaelni@gmx.at>
2011-02-07 16:56:49 +01:00
Diego Elio Pettenò
6a495e986f Make inter_rvlc and intra_rvlc static tables.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 84ae8936f6)
2011-02-06 20:31:47 +01:00
Anton Khirnov
fbdcdaee6e Replace remaining occurrences of deprecated CH_* with AV_CH_*
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c2fcd0a7a4)
2011-02-06 20:31:47 +01:00
Kieran Kunhya
e10976eb77 Set channel_layout for mpegaudio
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit f4a86bc981)
2011-02-06 20:31:46 +01:00
Alexander Strange
3c90abf40f vp3: Move table allocation code into a new function
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit edbb0c0708)
2011-02-06 20:31:45 +01:00
Alexander Strange
dc4a188309 vp3: Factor out expression
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e8dcd73058)
2011-02-06 20:31:45 +01:00
Jason Garrett-Glaser
e9266a2be0 VP8: slightly faster loopfilter sharpness logic
(cherry picked from commit 8a2c99b486)
2011-02-06 20:31:44 +01:00
Jason Garrett-Glaser
9efa368f19 VP8: faster deblock strength calculation
Convert hev_thresh logic to a LUT, simplify mbedge_lim calculation.
(cherry picked from commit 79dec1541b)
2011-02-06 20:31:44 +01:00
Clément Bœsch
b9004bd50c Remove a few if (p) av_freep(&p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 523d9407d5)
2011-02-06 20:31:44 +01:00
Jason Garrett-Glaser
c54ac7a8f2 VP8: faster filter_level clip
(cherry picked from commit a1b227bb53)
2011-02-06 20:31:43 +01:00
Jason Garrett-Glaser
8cde1b7997 VP8: simplify lf_delta mb mode logic
(cherry picked from commit dd18c9a050)
2011-02-06 20:31:43 +01:00
Anton Khirnov
7cb5258483 Rename remaining occurrences of SAMPLE_FMT_* to AV_SAMPLE_FMT_*
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 151595fe2e)
2011-02-04 03:10:12 +01:00
Anton Khirnov
4d9c044d47 Replace remaining occurrences of CODEC_TYPE_* with AVMEDIA_TYPE*
Tested to compile with lavc major bump.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit b2ed95ec48)
2011-02-04 03:10:12 +01:00
Tomas Härdin
6cd67b9f5b Add CODEC_ID_PRORES and bump lavc minor version
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f5b82f45dc)
2011-02-04 03:10:11 +01:00
Clément Bœsch
e31a744155 Remove a few if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 437fb1c87d)
2011-02-04 03:10:10 +01:00
Nicolas George
cf96cce728 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>
(cherry picked from commit 62ecd3635a)
2011-02-04 03:10:10 +01:00
Justin Ruggles
1003022668 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>
(cherry picked from commit c3beafa0f1)
2011-02-04 03:08:10 +01:00
Mans Rullgard
01b75fa931 ARM: add helper macro for declaring constant data
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit b9a639ddd6)
2011-02-04 03:08:09 +01:00
Justin Ruggles
fe2ff6d247 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>
(cherry picked from commit c73d99e672)
2011-02-04 03:08:09 +01:00
Alex Converse
a35d782d28 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>
(cherry picked from commit 770c410fbb)
2011-02-04 03:08:09 +01:00
Anssi Hannula
45eaec3029 h264: add profile names for the existing defines
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 71e0bee9ea)
2011-02-02 03:40:50 +01:00
Janne Grunau
94e3e83f13 h264: Add Intra and Constrained Baseline profiles to avctx.profile
(cherry picked from commit fe9a3fbe42)
2011-02-02 03:40:50 +01:00
Gianluigi Tiesi
8a92ec71b3 dca: avoid C99 declaration in for() expression
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e86e858111)
2011-02-02 03:40:50 +01:00
Jason Garrett-Glaser
5ad4335c22 VP8: merge chroma MC calls
Adds some duplicated code, but avoids duplicate edge checks and similar.
~0.5% faster overall on Parkjoy test sample.
(cherry picked from commit 64233e702a)
2011-02-02 03:40:49 +01:00
Ronald S. Bultje
baffa091af 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.
(cherry picked from commit 81f2a3f4ff)
2011-02-02 03:40:49 +01:00
Justin Ruggles
389b5bfa34 cosmetics: indentation
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d19b744a36)
2011-02-02 03:40:49 +01:00
Justin Ruggles
a8ae4e0e7b Remove unneeded add bias from 3 functions.
DSPContext.vector_fmul_window()
DCADSPContext.lfe_fir()
SynthFilterContext.synth_filter_float()

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 80ba1ddb58)
2011-02-02 03:40:48 +01:00
Jason Garrett-Glaser
a4257d74e0 Slightly simplify VP8 inter_predict
Merge an if and a switch.
(cherry picked from commit 73be29b0c4)
2011-01-31 18:25:45 +01:00
Luca Barbato
9ef5a9deaf Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
(cherry picked from commit dfd2a005eb)
2011-01-30 03:41:48 +01:00
Justin Ruggles
4592c85fc8 Flush final frames in libfaac encoder.
Gives decoded output identical in length to faac commandline encoder.
Fixes Issue 670.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 243f8241db)
2011-01-30 03:41:47 +01:00
Vitor Sessak
5255acc6be Fix memory leak in ALS decoder in big endian systems
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e0eb963aaa)
2011-01-30 03:41:47 +01:00
Mans Rullgard
451b4b8635 Rearrange MpegEncContext to simplify access from asm
This moves the fields needed by asm near the top, before any
structs or other members which complicate the offset calculation.
Modifying other structs will no longer require updating the offsets,
and the asm code is slightly simpler due to the smaller offsets.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d461a47317)
2011-01-30 03:41:47 +01:00
Vitor Sessak
bc0a603c78 Fix overread in altivec DSP function sad16
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 3af1fe829e)
2011-01-30 03:41:47 +01:00
Mans Rullgard
8afac88e14 ARM: update MpegEncContext offsets
(cherry picked from commit 0745116c10)
2011-01-30 03:41:01 +01:00
Ronald S. Bultje
d23e3e5fea Move ff_emulated_edge_mc() into DSPContext.
(cherry picked from commit 2e27959879)
2011-01-30 03:41:01 +01:00
Ronald S. Bultje
efcc106455 Optimize C version of ff_emulated_edge_mc().
From ~780 cycles to 551 cycles, mostly just by using libc memcpy()
instead of manually shuffling individual bytes around.
(cherry picked from commit e5262ec44a)
2011-01-30 03:41:00 +01:00
Alex Converse
79615a3e50 aacdec: Convert some loop copies into memcpy()s.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e5c82df80e)
2011-01-30 03:41:00 +01:00
Stefano Sabatini
e86c78836b In the rawvideo decoder, set pkt_pts in the output frame.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 3c802cabba)
2011-01-30 03:40:59 +01:00
Ronald S. Bultje
6642a17935 Fix VP8 aliasing problems.
Replace * (uint32_t *) buf accesses with AV_WN32A/AV_COPY32.
(cherry picked from commit 9d4bdcb714)
2011-01-30 03:40:59 +01:00
Alex Converse
b5f83debf5 Make ff_float_to_int16*_c() static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 5ce5dbc5f3)
2011-01-30 03:40:58 +01:00
Diego Elio Pettenò
06c8f31e84 Hide the now-prefixed decoders, encoders, parsers, bsf, hwaccel objects.
This significantly reduces the size of the symbol table in the generated ELF
shared object (as well as the other linked tables).

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ac28ce5fac)
2011-01-30 03:40:58 +01:00
Justin Ruggles
79ce107847 cosmetics: indentation and spacing
(cherry picked from commit b5ec638343)
2011-01-28 03:15:35 +01:00
Justin Ruggles
733dbe7d18 Remove the add bias hack for the C version of DSPContext.float_to_int16_*().
(cherry picked from commit 9d06d7bce3)
2011-01-28 03:15:35 +01:00
Justin Ruggles
0ca4fcc94c Add special case for 2nd-order IIR filter.
40% faster in ff_iir_filter_flt() when c->order == 2.
(cherry picked from commit 37cb3eb534)
2011-01-28 03:15:35 +01:00
Luca Barbato
1d20121b2e Add ff_ to AVHWAccel decoders
That unbreaks compilation of vaapi and dxva2

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit d1b6f33bf2)
2011-01-28 03:15:35 +01:00
Ronald S. Bultje
e3c5395402 VP8: don't overread edges on fourtap MC.
Fix C VP8 H+V MC functions which do two-dimensional 4/6-tap filters to
not overread beyond their edges if the second filter is 4-tap, since
the outer pixels aren't there anymore since
44002d8323.
(cherry picked from commit 22893e10ae)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
e7e2df27f8 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
4b21c38180 Make ff_cmap_read_palette static to libavcodec/iff.c. Delete iff.h.
The iff.h header only declared one function that is now static, the
libavformat/iff.c source file wasn't using it before. Drop the file
entirely.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 2d162e3825)
2011-01-28 03:15:33 +01:00
Justin Ruggles
dff80041e3 Add ff_ prefix to ac3_common_init().
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4c57cde942)
2011-01-28 03:15:33 +01:00
Justin Ruggles
e732af87fc ac3: Remove ff_ac3_critical_band_size_tab.
It is only used to generate band_start_tab, which about the same size, at
runtime, so it's simpler just to always hardcode band_start_tab.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 24e3ad3031)
2011-01-28 03:15:32 +01:00
Diego Elio Pettenò
d4a847711d Mark C base versions of FFT functions static to fft.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 7767d8d361)
2011-01-28 03:15:32 +01:00
Marco Gittler
5f58927baf Pass field order flag to libx264
Signed-off-by: Jason Garrett-Glaser <jason@x264.com>
(cherry picked from commit b09f548285)
2011-01-28 03:15:32 +01:00
Diego Elio Pettenò
be61983d52 Make ff_add_wav static to ra144.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 1a88674862)
2011-01-26 03:43:33 +01:00
Diego Elio Pettenò
877937b382 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 13eb6b9097)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
97c5b0fa95 Make ff_sin_tabs constant to rdft.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit d625a32d6b)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
e164553a82 Make ff_spatial_idwt_{init, slice} static to dwt.c
Both functions seem to be commanded by the ff_spatial_idwt function
instead.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit ebb06d96ed)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
ff0d737d6e Make ff_png_pass_xmin and ff_png_pass_xshift static to png.c.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit f2e246f576)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
998d9ee7a4 Remove unused ff_ac3_parse_header_full function.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 676f1f533e)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
123241214c Make ff_h264_decode_rbsp_trailing static to h264.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 8529731961)
2011-01-26 03:43:31 +01:00
Ronald S. Bultje
ac3c04e4d6 Don't do edge emulation unless the edge pixels will be used in MC.
Do not emulate larger edges than we will actually use for this round of
MC. Decoding goes from avg+SE 29.972+/-0.023sec to 29.856+/-0.023, i.e.
0.12sec or ~0.4% faster.
(cherry picked from commit 44002d8323)
2011-01-26 03:43:31 +01:00
Mans Rullgard
8169afdb15 ac3: remove ff_ac3_critical_band_size_tab[] external declaration
This fixes compilation broken by 6ed3b504f9

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 21c900129c)
2011-01-26 03:43:30 +01:00
Diego Elio Pettenò
6b784f1b91 Move ff_ac3_critical_band_size_tab in ac3.c for non-hardcoded tables.
This symbol is only ever used to calculate the non-hardcoded tables, so
only enable it in that case, and static to the source unit that uses it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 6ed3b504f9)
2011-01-26 03:43:30 +01:00
Diego Elio Pettenò
a172126c38 Remove unused ac3_parametric_bit_allocation function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 362bfe2997)
2011-01-26 03:43:30 +01:00
Mans Rullgard
8719b5dd60 latm: remove superflous #includes
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e153e9a53a)
2011-01-26 03:43:30 +01:00
Mans Rullgard
e164311179 Make denoise_dct_c() and dct_quantize_trellis_c() static in definitions
1d4da6a460 added static to the
prototypes for these fuctions.  Adding it to the definitions
as well.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit aa61e39eac)
2011-01-26 03:43:30 +01:00
Diego Elio Pettenò
11c7f64a9c Don't declare a pcm_dvd encoder.
The PCM_DVD encoder would be left unused, as allcodecs.c properly declared
it as being decoder-only, but it would still be built into the object file.

Since there is no block of code to properly encode this PCM format, it's
not a full codec.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 5b5083b5fe)
2011-01-26 03:43:29 +01:00
Diego Elio 'Flameeyes' Pettenò
463532310a Don't check for DEBUG before using dprintf.
The dprintf macro is no-op when DEBUG is unset, so there is no need to
put it conditional to DEBUG.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 73a0b19ba3)
2011-01-26 03:43:29 +01:00
Diego Elio Pettenò
295edc7794 Make denoise_dct_c and dct_quantize_trellis_c static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 1d4da6a460)
2011-01-26 03:43:29 +01:00
Diego Elio Pettenò
291f326a2e Make the ff_lockmgr_cb function pointer static to utils.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit bb875b75ba)
2011-01-26 03:43:29 +01:00
Diego Elio Pettenò
ee7fed27d4 Rename sf_table in atrac.c unit to ff_atrac_sf_table.
This ensures a locally-unique name as well as marks the symbol as
FFmpeg-private at least by declaration.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 82e1f217f2)
2011-01-26 03:43:29 +01:00
Diego Elio Pettenò
f7e5cc0a2c Mark qmf_window table static to atrac.c unit.
The table is not used anywhere else on libavcodec.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 53493f9a81)
2011-01-26 03:43:29 +01:00
Mans Rullgard
e243ed656c x86: fix overflow in h264 8x8 planar prediction
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 80944df720)
2011-01-26 03:43:29 +01:00
Kostya
69c78161d2 reindent after last commit
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit dacbcd170a)
2011-01-26 03:43:28 +01:00
Kostya
8a485dd399 Extend WavPack demuxer and decoder to support >2 channel audio
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 3bdc886c22)
2011-01-26 03:43:28 +01:00
Mans Rullgard
0fc1961ecc ARM: NEON: fix overflow in h264 16x16 planar pred
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 78f318be59)
2011-01-26 03:43:28 +01:00
Mans Rullgard
d112aa5acc MIPS: use inline asm only when supported by compiler
(cherry picked from commit 7a5a168abe)
2011-01-26 03:43:28 +01:00
Janne Grunau
604eb152fc aacenc: fix typo in sync extension constant in 8ae0fa2
(cherry picked from commit 2fd9035ddc)
2011-01-26 03:43:27 +01:00
Reimar Döffinger
e7b95918fc Use av_fast_malloc instead of av_realloc.
This should be faster, is less code and fixes issue 2524
(allocation error would lead to crash).
2011-01-24 19:35:20 +01:00
Mans Rullgard
91d51ee4b5 Remove redundant checks against MIN_CACHE_BITS
With the removal of the libmpeg2 bitstream reader, MIN_CACHE_BITS
is always >= 25, so tests against smaller values can be removed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f162e988aa)
2011-01-23 19:32:09 +01:00
Mans Rullgard
a4bff12cdd get_bits: move tracing macros to end of file
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 611a6f59ce)
2011-01-23 19:32:09 +01:00
Mans Rullgard
371cf026a7 Sanitise get_bits macros, part 2
These whitespace changes improve the readability of the get_bits
macros.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fb5c841d5f)
2011-01-23 19:32:09 +01:00
Mans Rullgard
d232e09d51 Sanitise get_bits macros, part 1
Some of the macros in get_bits.h include a final semicolon,
some do not.  This removes these or adds do {} while(0) around
the macros as appropriate and adds semicolons where needed in
calling code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit bf5f9b528b)
2011-01-23 19:32:08 +01:00
Mans Rullgard
990f213e57 Remove "libmpeg2" bitstream reader
Using the libmpeg2 reader causes errors in a multitude of places,
including MPEG and H264 codecs.  As the advantage of this reader
is questionable, removing it seems the sensible course of action,
especially considering the simplifications this allows elsewhere
with the bit cache size increasing from 17 to 25 bits as minimum.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 938f72e199)
2011-01-23 19:32:08 +01:00
Justin Ruggles
eddf8f4100 ac3enc: use dsputil functions in apply_window()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 3b924294ea)
2011-01-23 19:32:08 +01:00
Justin Ruggles
015f9f1ad3 Change DSPContext.vector_fmul() from dst=dst*src to dest=src0*src1.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 6eabb0d3ad)
2011-01-23 19:32:08 +01:00
Ronald S. Bultje
fb397b1a19 Reindent.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit fcb7e535dd)
2011-01-23 19:32:08 +01:00
Ronald S. Bultje
2ed0f76655 Fix crash on resolution change (issue 2393).
Don't free RBSP tables (containing decoded NAL units) on resolution
change, because we actually need this data to decode the frame after
reiniting (with new resolution). Fixed issue 2393.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 9107892624)
2011-01-23 19:32:08 +01:00
Mans Rullgard
60c99b5510 Make LOCAL_ALIGNED macro fully C99 compatible
C99 variadic macros require more arguments than there are named
parameters in the definition.  This means we must use an extra
indirection to avoid having two different macros for arrays with
one resp more than one dimension.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 96aad41e81)
2011-01-23 19:32:08 +01:00
Alex Converse
d5ec00ba57 Remove H.264 encoder fragments
It's incomplete, no one is working on it, and when someone asks about
working on it we advise them not to.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ff3d43104f)
2011-01-23 19:32:08 +01:00
Alex Converse
d67a6aa59c aacenc: mark SBR absent
Use backwards compatible explicit signalling to denote the absence of
SBR.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 8ae0fa243e)
2011-01-23 19:32:08 +01:00
Justin Ruggles
ff5eded449 10l: reverse the biquad coefficients.
I did not notice that the filter implementation uses a reversed history state.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 98cfadd648)
2011-01-23 19:32:07 +01:00
Anssi Hannula
890b771cc1 libfaac: add recognized profiles array
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit b92f76e209)
2011-01-23 19:32:07 +01:00
Clément Bœsch
204a18151c Move ID3v1 skip from decoder to demuxer
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 045b80e52d)
2011-01-23 19:32:07 +01:00
Anssi Hannula
6345dfcfd0 dca: add profile names
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f4096bf6ee)
2011-01-23 19:32:07 +01:00
Justin Ruggles
17d4f4558e iir: Change dst param to float* in ff_iir_filter_flt().
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 69915b48d6)
2011-01-23 19:32:07 +01:00
Anssi Hannula
cf9cb1f99a dca: consider a stream with XXCh/X96 in ExSS as DTS-HD HRA
DTS-HD HRA streams do not always have an XBR extension in the extension
substream. Instead they can have only XXCh and X96 extensions in
there and still be considered DTS-HD HRA.

This is also confirmed with Onkyo TX-SR607 receiver which recognizes
such a stream as HiRes Audio.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 8f4a5d225c)
2011-01-23 19:32:07 +01:00
Justin Ruggles
384dbd617f cosmetics related to LPC changes.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 1c189fc533)
2011-01-23 19:32:06 +01:00
Justin Ruggles
7101b18508 Separate window function from autocorrelation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 77a78e9bdc)
2011-01-23 19:32:06 +01:00
Justin Ruggles
0d8837bdda Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 56f8952b25)
2011-01-23 19:32:06 +01:00
Mans Rullgard
cafa3edada dca: pretty-print some tables
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 2611e52088)
2011-01-21 20:36:01 +01:00
Justin Ruggles
a994f86196 iir: change filter type if/else to a switch.
Simplifies error handling and makes it easier to add additional filter types.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 0361d13cf3)
2011-01-21 20:36:01 +01:00
Justin Ruggles
aa226b2460 Add biquad high-pass and low-pass IIR filters.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fcdf0a43cd)
2011-01-21 20:36:01 +01:00
Ronald S. Bultje
7f8c11b005 Set gray (128) U/V planes for chroma-less samples. Fixes two fate samples
when played with -flags emu_edge.
(cherry picked from commit 8bcfe7f7fd)
2011-01-21 20:36:01 +01:00
Ronald S. Bultje
772225c041 Revert 2a1f431d38, it broke H264 lossless.
(cherry picked from commit 66c6b5e2a5)
2011-01-21 20:36:01 +01:00
Justin Ruggles
2293b0b698 Split out Butterworth filter coeff init to a separate function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 30112adadf)
2011-01-21 20:36:01 +01:00
Justin Ruggles
99c2111b12 cosmetics: vertical alignment and line wrap
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 75b98610a7)
2011-01-21 20:36:01 +01:00
Justin Ruggles
20d1f6fec1 Add memory allocation failure checks to ff_iir_filter_init_coeffs().
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d42dc217ed)
2011-01-21 20:36:01 +01:00
Justin Ruggles
7891fdcc03 cosmetics: wrap long line
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ebb230279a)
2011-01-21 20:36:00 +01:00
Justin Ruggles
b3b8b930fc Add function ff_iir_filter_flt() to accept floating-point input and output.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 0a3d7697b4)
2011-01-21 20:36:00 +01:00
Ronald S. Bultje
e25f19a113 Fix horizontal/horizontal_up 8x8l intra prediction x86/simd functions.
The original functions did not work correctly for edge pixels, e.g.
when CODEC_FLAG_EMU_EDGE is set, leading to corrupt output in e.g. VLC.
Based on a patch by Daniel Kang <daniel d kang gmail com>.

Signed-off-by: Ronald S. Bultje <rsbultje gmail com>
(cherry picked from commit b9c7f66e6d)
2011-01-21 20:35:46 +01:00
Justin Ruggles
f32e646d82 Fix use of sstep/dstep in ff_iir_filter().
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit c3897d7690)
2011-01-21 20:35:45 +01:00
Mans Rullgard
a6e5d231e9 a64enc: make PixelFormat arrays const 2011-01-18 20:48:24 +00:00
Mans Rullgard
ef4a65149d Replace ASMALIGN() with .p2align
This macro has unconditionally used .p2align for a long time and
serves no useful purpose.
2011-01-18 20:48:24 +00:00
Mans Rullgard
ac3c9d0169 x86: remove VLA in ac3_downmix_sse 2011-01-18 20:48:24 +00:00
Janne Grunau
2c3589bfda consolidate .gitignore patters into a single file
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-18 21:32:05 +01:00
Justin Ruggles
d425a03b59 cosmetics: reindent 2011-01-18 11:40:13 -05:00
Daniel Kang
1360f07e22 Add check for changing number of channels in DCA.
Fixes issue 2505.
2011-01-18 11:30:33 -05:00
Janne Grunau
db323491cd update av_log_missing_feature() to git
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 22:13:50 +01:00
Janne Grunau
348b8218f7 convert svn:ignore properties to .gitignore files
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 15:50:14 +01:00
Alexander Strange
6ee99a7e13 VP3: remove an unnecessary static variable
Originally committed as revision 26398 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-17 08:36:13 +00:00
Michael Niedermayer
013291501f Allocate last picture for 4xm pfrm if its not allocated.
Fixes segfault and issue2527

Originally committed as revision 26397 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 22:08:34 +00:00
Sascha Sommer
f62be777ee support decoding of files that contain the number
of vector coded coefficients in their bitstream
fixes issue 2536

Originally committed as revision 26388 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 16:39:53 +00:00
Carl Eugen Hoyos
a0f593d00d Values >4 for lowres corrupt output.
Originally committed as revision 26386 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 12:45:59 +00:00
Carl Eugen Hoyos
05503cee00 Since lowres == crop for bmp, remove it to avoid confusion.
Originally committed as revision 26384 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 12:42:43 +00:00