Commit Graph

13505 Commits

Author SHA1 Message Date
Mans Rullgard
dede36bd02 mpegaudio: sanitise compute_antialias_* names
This makes the compute_antialias functions use the same naming
convention as everything else.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-18 13:16:59 +01:00
Ronald S. Bultje
508a24f8dc mpeg12: add slice-threading checks to slice-threading initializers.
Fixes "make THREADS=2 THREAD_TYPE=1 fate-mpeg2-field-enc".
2011-05-18 06:54:15 -04:00
Ronald S. Bultje
8d44cd2cd8 h264: copy pixel_shift between slice threading contexts.
Fixes "make THREADS=2 THREAD_TYPE=2
fate-h264-conformance-frext-pph10i3_panasonic_a".
2011-05-18 06:54:15 -04:00
Alexander Strange
a64c58a240 mdec: enable frame-level multithreading.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-18 06:54:15 -04:00
Ronald S. Bultje
32ac63ee10 mdec.c: fix overread. 2011-05-18 06:54:15 -04:00
Justin Ruggles
a26d2b4bc8 Fix compilation of iirfilter-test. 2011-05-17 18:06:51 -04:00
Jindrich Makovicka
e25c67108a libx264: handle closed GOP codec flag
Also update libx264 presets to keep closed gop as default.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-17 23:01:42 +02:00
Mans Rullgard
4bac1bbc3b mpegaudio: add _fixed suffix to some names
This adds a _fixed suffix to the fixed-point versions of things
with both float and fixed-point variants.  This makes it more
consistent with other dual-implementation things, e.g. fft.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-17 20:17:36 +01:00
Daniel Kang
d0005d347d Modify x86util.asm to ease transitioning to 10-bit H.264 assembly.
Arguments for variable size instructions are added to many macros, along
with other various changes. The x86util.asm code was ported from x264.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-17 20:44:48 +02:00
Mans Rullgard
6f2309ed2e dct: build dct32 as separate object files
This builds the float and fixed-point versions of dct32 separately
instead of #including the file in dct.c and mpegaudiodec.c.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-17 13:57:23 +01:00
Mans Rullgard
1362a291c9 qdm2: include correct header for rdft
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-17 13:51:09 +01:00
Mans Rullgard
005db47011 mathops: remove ancient confusing comment
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-16 21:34:39 +01:00
Mans Rullgard
bdefbf3e88 mpegaudio: move OUT_FMT macro to mpegaudiodec.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-16 17:49:25 +01:00
Mans Rullgard
92ea249d7d mpegaudio: remove OUT_MIN/MAX macros
These macros are no longer needed after the s32 output was removed.
Change the relevant code to use av_clip_int16() instead of using
explicit limits.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-16 17:49:25 +01:00
Mans Rullgard
5026f946fd Add missing #includes to mp3_header_(de)compress bsf
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-16 17:10:46 +01:00
Mans Rullgard
9503fbb859 dct: fix indentation
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-16 16:20:27 +01:00
Mans Rullgard
721d6f2dc5 dct: bypass table allocation for DCT_II of size 32
The size-32 DCT_II has a special implementation which doesn't use
the normal tables.  Skipping allocation of these in this case saves
some memory.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-16 16:20:18 +01:00
Gil Pedersen
257de5fb25 h264dsp_mmx: Add #ifdefs around some mmxext functions on x86_64.
This fixes linking errors due to undefined symbols on x86_64 OS X.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-16 15:35:53 +02:00
Diego Biurrun
d39bf3df72 Remove unused header mpegaudio3.h.
The header is a part of an MP3 encoder that never saw the light of day.
2011-05-16 14:59:51 +02:00
Justin Ruggles
033a4a942a aacdec: Use float instead of int16_t for ltp_state to avoid needless rounding. 2011-05-15 17:42:05 -04:00
Diego Biurrun
7f995abed3 acelp: Remove unused gray_decode table. 2011-05-15 19:01:06 +02:00
Diego Biurrun
b1bb3b8d87 dfa: Remove unused variable.
This fixes the warning:
libavcodec/dfa.c:189: warning: unused variable ‘frame_end’
2011-05-15 13:12:47 +02:00
Diego Biurrun
888fa31eca Fix FSF address copy paste error in some license headers. 2011-05-14 21:32:31 +02:00
Martin Aumüller
b1eb7a1204 arm: properly mark external symbol call
Surround memset and ff_vp8_dct_cat_prob by X() in order to fix iOS build

Includes patch by Luca Barbato <lu_zero@gentoo.org>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-05-14 10:38:23 +02:00
Mans Rullgard
1550f45a89 Add av_clip_uintp2() function
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-13 16:45:24 -04:00
Reimar Döffinger
2c9a5172d3 dfa: fix buffer overflow checks to avoid integer overflows.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-13 07:38:54 +02:00
Justin Ruggles
4d7a421574 ac3enc: put the counting of stereo rematrixing bits in the same place to
make the code easier to understand.
2011-05-12 12:41:08 -04:00
Justin Ruggles
257de756fb ac3enc: clean up count_frame_bits() and count_frame_bits_fixed() 2011-05-12 12:41:08 -04:00
Michael Niedermayer
c4fb3b0327 mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
This allows the values to be used without changing C code and is closer to how
the other DEBUG flags work.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:28 +02:00
Aurelien Jacobs
ea5fa19427 srtdec: make sure we don't write past the end of buffer
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:28 +02:00
Tomas Härdin
ee81e76db1 wmaenc: improve channel count and bitrate error handling in encode_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:28 +02:00
Stefano Sabatini
bbc572a2c4 tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
Format detection and internal frame initialization is moved to a
separate init_image() function, which is called when all the tags have
been read, and so both BitsPerSample and SamplesPerPixel information
has been collected.

This fixes decoding of the file 11.tiff from roundup issue #1925.

Based on a patch by Kostya Shishkov <kostya.shishkov@gmail.com>.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 17:59:56 +02:00
Stefano Sabatini
8102d886be tiff: Prefer enum TiffCompr over int for TiffContext.compr.
This is safer and helps debugging.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 17:37:08 +02:00
Baptiste Coudurier
14cf9e698d dnxhdenc: add AVClass in private context.
Fixes private options.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 13:08:10 +02:00
Diego Biurrun
0a6b1a9f21 Replace int_fast integer types with their sized standard posix counterparts.
The _fast integer types provide no realworld benefits, but may introduce
portability issues and are just plain ugly.
2011-05-12 12:05:54 +02:00
Diego Biurrun
be89845708 jfdct: Replace sized int_fast integer types with plain int/unsigned.
int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.
2011-05-12 11:56:53 +02:00
Diego Biurrun
046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.

This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually.  It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.

Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems.  We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02:00
Jason Garrett-Glaser
5705b02079 10-bit H.264 x86 chroma v loopfilter asm
Also delete some unused deblock asm macros.
2011-05-11 11:09:10 -07:00
Baptiste Coudurier
9aa91043f3 Port SMPTE S302M audio decoder from FFmbc 0.3. 2011-05-11 17:25:06 +02:00
Anatoly Nenashev
b44c8ad280 Fix crash of interlaced MPEG2 decoding
Problem description, preliminary review discussion at
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/127731
2011-05-11 16:35:02 +02:00
Ronald S. Bultje
d2bf42895a h264pred: fix one more aliasing violation.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 15:48:51 +02:00
Anton Khirnov
880fa21830 flacenc: use proper initializers for AVOption default values.
default_val was recently changes from double to a union, current code
wasn't updated for that.
2011-05-11 15:48:51 +02:00
Anton Khirnov
c9e81d0783 lavc: deprecate named constants for deprecated antialias_algo. 2011-05-11 15:48:51 +02:00
Reinhard Tartler
083e715f33 aac: workaround for compilation on cygwin
On cygwin, math.h needs to be included before float.h because of a bug
in the system headers. Including libavutil/libm.h first works around
this issue.

Longer discussion of the topic:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/128582
2011-05-11 14:38:14 +02:00
Baptiste Coudurier
5c511ad4ce swscale: extend YUV422p support to 10bits depth
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 14:38:14 +02:00
Stefano Sabatini
b437f5b055 tiff: add support for inverted FillOrder for uncompressed data
Fix decoding of file b.tif, trac issue #168.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-11 13:55:44 +02:00
Ronald S. Bultje
2caf19e90f h264pred: fix aliasing violations.
Tested to fix Haiku H264/10bit fate failures, may also fix others.
2011-05-11 06:59:16 -04:00
Alex Converse
ffc437c026 cosmetics: Fix crazy formatting in resample. 2011-05-10 20:09:51 -07:00
Alex Converse
3e00ababc4 Allow resampling with no channel count change for up to 8 channels. 2011-05-10 20:08:18 -07:00
Alex Converse
918a540953 Don't allow unsupported resampling configurations. 2011-05-10 20:07:15 -07:00
Jason Garrett-Glaser
9f3d6ca4f1 Port x86 10-bit H.264 deblock asm from x264 2011-05-10 20:02:15 -07:00
Jason Garrett-Glaser
8ad77b65b5 Update x86 H.264 deblock asm
Includes AVX versions from x264.
2011-05-10 20:01:58 -07:00
Anton Khirnov
b66752790a AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-05-10 20:22:06 +02:00
Ronald S. Bultje
b27b54de31 arm/h264pred: add missing argument type. 2011-05-10 08:44:49 -04:00
Ronald S. Bultje
86b29553f8 h264dsp_mmx: place bracket outside #if/#endif block.
Should fix compile on systems missing yasm/nasm.
2011-05-10 08:39:38 -04:00
Ronald S. Bultje
e86fbe1751 h264: do not print "too many references" warning for intra-only.
Fixes issue 2679.
2011-05-10 07:24:39 -04:00
Oskar Arvidsson
d545cf804c Enable decoding of high bit depth h264.
This patch completes the high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:38 -04:00
Oskar Arvidsson
19a0729b4c Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
This patch lets e.g. dsputil_init chose dsp functions with respect to
the bit depth to decode. The naming scheme of bit depth dependent
functions is <base name>_<bit depth>[_<prefix>] (i.e. the old
clear_blocks_c is now named clear_blocks_8_c).

Note: Some of the functions for high bit depth is not dependent on the
bit depth, but only on the pixel size. This leaves some room for
optimizing binary size.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:36 -04:00
Oskar Arvidsson
fcc0224e4f Add support for higher QP values in h264.
In high bit depth, the QP values may now be up to (51 + 6*(bit_depth-8)).

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:35 -04:00
Oskar Arvidsson
6e3ef511d7 Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:33 -04:00
Oskar Arvidsson
44ca80df34 Make the h264 loop filter bit depth aware.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:32 -04:00
Oskar Arvidsson
87ce8b495f Template dsputil_template.c with respect to pixel size, etc.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:30 -04:00
Oskar Arvidsson
5d4bd9cc89 Template h264idct_template.c with respect to pixel size, etc.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:28 -04:00
Oskar Arvidsson
de3e760720 Preparatory patch for high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:27 -04:00
Oskar Arvidsson
325eefa2ca Move some functions in dsputil.c into a new file dsputil_template.c.
The functions moved are used when decoding h264.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:25 -04:00
Oskar Arvidsson
15fb393be6 Move the functions in h264idct into a new file h264idct_template.c.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:24 -04:00
Oskar Arvidsson
5ada25245d Move the functions in h264pred.c into a new file h264pred_template.c.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:22 -04:00
Oskar Arvidsson
563c72dabb Preparatory patch for high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:21 -04:00
Oskar Arvidsson
42239ced65 Add pixel formats for 9- and 10-bit yuv420p.
Also add support for these formats in libswscale.

Needed for high bit depth h264 decoding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:19 -04:00
Oskar Arvidsson
e39e3abad4 Choose h264 chroma dc dequant function dynamically.
Needed for high bit depth h264 decoding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:17 -04:00
Ronald S. Bultje
dd561441b1 h264: DSP'ize MBAFF loopfilter. 2011-05-10 07:24:08 -04:00
Anton Khirnov
188dea1dbf lavc: move some flac-specific options to its private context. 2011-05-10 07:42:33 +02:00
Mans Rullgard
a88ef93b4a mpegaudiodec: group #includes more sanely
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-09 22:27:16 +01:00
Mans Rullgard
0d849074a4 mpegaudio: remove #if 0 blocks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-09 22:22:12 +01:00
Mans Rullgard
6bb6fb05ba mpegaudio: remove CONFIG_MPEGAUDIO_HP option
The low quality mode is off by default and never tested.  The high
quality mode is also plenty fast enough.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-09 17:30:12 +01:00
Mans Rullgard
3a2e80ecbc mpegaudio: remove CONFIG_AUDIO_NONSHORT
This fake option cannot be enabled by normal means, and the
floating-point decoder should provide the higher quality this
option presumably was intended for.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-09 10:12:47 +01:00
Nathan Caldwell
b58e298572 psymodel: Remove wrapper functions.
Instead use the function pointers directly.
2011-05-08 12:43:04 -07:00
Nathan Caldwell
5b29af624f aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'. 2011-05-08 12:42:34 -07:00
Alex Converse
869303bebd wmavoice: Use proper size in memeset().
sizeof(array_functrion_argument) gives the size of the pointer type not
the size of the array to which it points.
2011-05-05 21:25:48 -07:00
Diego Biurrun
61165a1bba Fix standalone compilation of WTV demuxer. 2011-05-04 21:12:40 +02:00
Diego Biurrun
091018e0dd Fix standalone compilation of MXPEG decoder. 2011-05-04 21:12:40 +02:00
Diego Biurrun
35e376b0d2 flashsv: K&R cosmetics 2011-05-04 21:12:39 +02:00
Ronald S. Bultje
7d2e03afc8 vc1: make overlap filter for I-frames bit-exact. 2011-05-04 07:40:53 -04:00
Ronald S. Bultje
5c9f147e05 vc1dec: use s->start/end_mb_y instead of passing them as function args. 2011-05-04 07:40:02 -04:00
Ronald S. Bultje
18b6a69ce9 Revert "VC1: merge idct8x8, coeff adjustments and put_pixels."
This reverts commit f8bed30d8b. The reason
for this is that the overlap filter, which runs after IDCT, should run
on unclamped values, and thus IDCT and put_pixels() cannot be merged if
we want to attempt to be bitexact.
2011-05-04 07:40:01 -04:00
Alex Converse
1a5e4fd8c5 Replace strncpy() with av_strlcpy(). 2011-05-03 21:20:13 -07:00
Alex Converse
aab6374bbe indeo3: Eliminate use of long. 2011-05-03 21:20:05 -07:00
Alex Converse
47bc52f821 get_bits: make cache unsigned to eliminate undefined signed overflow. 2011-05-03 21:14:39 -07:00
Ronald S. Bultje
d969e93a72 mpegvideo: reindent. 2011-05-03 22:35:19 -04:00
Ronald S. Bultje
fb22c23715 mpegvideo: don't av_malloc(0). 2011-05-03 22:29:00 -04:00
Ronald S. Bultje
4773d90421 vp8: frame-multithreading.
Tested on a Mac Pro, 2 CPUs, 2 cores each, OSX 10.6.6:

time ./ffmpeg -v 0 -vsync 0 -threads [1234] -i \
  ~/Downloads/sintel_trailer_1080p_vp8_vorbis.webm \
  -f null -vcodec rawvideo -an -
1: 0m14.630s (89.9 fps)
2: 0m8.056s (163.2 fps)
3: 0m5.882s (223.6 fps)
4: 0m4.952s (265.6 fps)

time ./ffmpeg -v 0 -vsync 0 -threads [1234] -i \
  ~/Downloads/Elephants_Dream-720p-Stereo.webm \
  -f null -vcodec rawvideo -an -
1: 1m12.962s (215.1 fps)
2: 0m44.682s (351.2 fps)
3: 0m31.183s (503.2 fps)
4: 0m25.284s (620.6 fps)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-02 17:03:31 +02:00
Stefano Sabatini
975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Stefano Sabatini
6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Kostya Shishkov
b178cd76b2 dpx: Do not use DPX encoder for decoding.
10l to the one who hasn't checked this.
2011-05-02 11:04:20 +02:00
Diego Biurrun
ad1862d64a ALPHA: Replace sized int_fast integer types with plain int/unsigned.
int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.
2011-05-01 20:50:12 +02:00
Peter Ross
e27ce0eea3 DPX image encoder 2011-05-01 19:35:55 +02:00
Peter Ross
406629150c DPX decoder: read sample aspect ratio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 19:35:55 +02:00
Reimar Döffinger
3777ea13fb DPX decoder: add buffer size checks. 2011-05-01 19:35:55 +02:00
Justin Ruggles
63b1866ae1 ac3enc: clip large coefficient values and negative exponents rather than using
av_assert2().
2011-05-01 13:32:04 -04:00
Justin Ruggles
177fed4e9b ac3enc: do not store a bandwidth code for each channel.
Although AC-3 allows it, it's not very useful. The encoder uses the same code
for all full-bandwidth channels.
2011-05-01 13:32:04 -04:00