Commit Graph

14600 Commits

Author SHA1 Message Date
Mans Rullgard
9776e25db9 ARM: jrevdct_arm: simplify stack usage
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-13 12:30:22 +01:00
Mans Rullgard
13743c7ab0 ARM: jrevdct_arm: use push/pop mnemonics
Use push/pop instead of stmdb/ldmia for stack operations.  This
is the preferred syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-13 12:30:22 +01:00
Mans Rullgard
77cdfde73e ARM: jrevdct_arm: misc cleanup
- use 'const' macro to define coeff table
- add missing endfunc
- remove superflous directives

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-13 12:30:22 +01:00
Mans Rullgard
5c46ad1da0 ARM: optimised mpadsp_apply_window_fixed
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-13 11:33:44 +01:00
Alex Converse
19d824e473 bitstream: Properly promote av_reverse values before shifting. 2011-06-10 13:04:25 -07:00
Jason Garrett-Glaser
c149843b5a H.264: Fix high bit depth explicit biweight
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-10 14:45:49 -04:00
Oskar Arvidsson
6c031a3338 h264: Fix 10-bit H.264 x86 chroma v loopfilter asm.
The tc variable was not splatted correctly.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-10 14:44:57 -04:00
Justin Ruggles
aecc596a65 Update copyright year for ac3enc_opts_template.c.
The code was originally committed to Libav on March 25, 2011.
2011-06-10 12:58:08 -04:00
Juan Carlos Rodriguez
0832122880 rtpenc: MP4A-LATM payload support
This is enabled with an AVOption on the RTP muxer. The SDP
generator looks for a latm flag in the rtpflags field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-06-10 10:49:20 +03:00
Michael Niedermayer
d8999306e5 mpeg12: more advanced ffmpeg mpeg2 aspect guessing code.
Fixes issue1613, 621, 562 simultaneously

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-10 09:06:02 +02:00
Anton Khirnov
8e84c072e4 intelh263dec: aspect ratio processing fix.
patch submitted by xvid_fan freenet de
2011-06-09 22:53:17 +02:00
Anton Khirnov
95a05030ca intelh263dec: fix "Strict H.263 compliance" file playback
fixes issue2449

patch submitted by xvid_fan freenet de
2011-06-09 22:53:17 +02:00
Diego Biurrun
a4855adc80 dvbsubdec: Fix compilation of debug code. 2011-06-08 11:53:53 +02:00
Diego Biurrun
ac4a854811 Remove some non-compiling debug messages. 2011-06-08 00:45:47 +02:00
Daniel Kang
4de83b7b6d H264: x86 predict init cosmetics.
Change indentation and whitespace; also move HAVE_YASM blocks.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-08 00:22:52 +02:00
Diego Biurrun
d3778972d8 ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder.
The AC-3 encoder unconditionally references some symbols from the E-AC-3
encoder; make those references conditional to fix linking.
2011-06-08 00:06:19 +02:00
Justin Ruggles
c8e9ea43d0 Move E-AC-3 encoder functions to a separate eac3enc.c file. 2011-06-07 15:16:41 -04:00
Justin Ruggles
787a13535a ac3enc: remove convenience macro, #define DEBUG 2011-06-07 15:16:41 -04:00
Justin Ruggles
a8bd53402a ac3enc: remove unused #define 2011-06-07 15:16:41 -04:00
John Stebbins
7b20d35a54 vc1: re-initialize tables after width/height change.
read_sequence_header can change width/height; therefore, re-initialize
all tables if width/height changed

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-07 19:55:02 +02:00
Justin Ruggles
2f37321abc iirfilter: fix biquad filter coefficients.
The current filter implementation should only have the cx coefficients
divided by gain in order to give the correct output scale.
2011-06-07 10:47:36 -04:00
Diego Biurrun
b9478cfefb shorten: Remove stray DEBUG #define and corresponding av_dlog statement. 2011-06-07 15:18:43 +02:00
Diego Biurrun
2d9570a304 vorbisdec: Restore mistakenly removed debug output. 2011-06-07 14:02:38 +02:00
Diego Biurrun
02a8d43adf Replace some av_log/printf + #ifdef combinations by av_dlog. 2011-06-07 13:20:58 +02:00
Diego Biurrun
1f6b9cc31d Replace some nonstandard DEBUG_* preprocessor directives by plain DEBUG. 2011-06-07 13:20:58 +02:00
Diego Biurrun
f8ea0eb6ff svq1dec: Fix debug statements that referenced non-existing context. 2011-06-07 13:20:57 +02:00
Diego Biurrun
dc25d79f49 Drop unnecessary directory prefixes from #include directives. 2011-06-07 10:31:26 +02:00
Baptiste Coudurier
4f8da7e7dc s302m: fix resampling for 16 and 24bits. 2011-06-06 12:17:19 -07:00
Mans Rullgard
21c6512542 ARM: remove MUL64 and MAC64 inline asm
Current GCC versions know how to generate these instructions
properly and avoiding inline asm gives better code.  The MULH
function for ARMv5 uses the same instruction and is also not
needed any more.

The MLS64 macro remains since negating an input would normally
not be allowed as it would fail for INT_MIN.  In our uses, the
inputs never have this value and thus negating is safe.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-06 17:33:40 +01:00
Ronald S. Bultje
ceff045dbe utils.c: fix crash with threading enabled. 2011-06-06 10:31:01 -04:00
Daniel Kang
a8d44f9dd5 Add x86 assembly for some 10-bit H.264 intra predict functions.
Parts are inspired from the 8-bit H.264 predict code in Libav.
Other parts ported from x264 with relicensing permission from author.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-06 01:31:02 +02:00
Diego Biurrun
ef5d7e18f4 Skip tableprint.h during 'make checkheaders'.
It is only used on the host and may not compile on the target.
2011-06-05 16:01:01 +02:00
Diego Biurrun
f25a2ece76 Drop explicit filenames from @file Doxygen tags.
The filename is unnecessary and brittle across file renames.
2011-06-05 16:01:00 +02:00
Diego Biurrun
29b3de127f Skip generated table headers during 'make checkheaders'. 2011-06-05 16:01:00 +02:00
Anton Khirnov
367732832f lavf,lavc: free avoptions in a generic way.
It's simpler and less error-prone.

Fixes some memleaks along the way.
2011-06-05 15:01:36 +02:00
Diego Biurrun
92b4abc2ad tableprint: Restore mistakenly deleted common.h #include for FF_ARRAY_ELEMS.
This fixes the build with hardcoded tables enabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-05 12:25:38 +01:00
Stefano Sabatini
1863a3c7aa tiff: print log in case of unknown / unsupported tag.
Helps debugging.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-05 12:49:14 +02:00
Stefano Sabatini
a43458d7eb tiff: fix linesize for mono-white/black formats.
Fix decoding of file Test_1bpp.tif

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-05 12:49:14 +02:00
Mans Rullgard
5a4a71257c Fix build of eval-test program
eval.c has moved to libavutil, move the TESTPROGS entry too.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-05 11:47:14 +01:00
Justin Ruggles
35d5cb1ab4 ac3enc: extract all exponents for the frame at once 2011-06-04 19:08:37 -04:00
Mans Rullgard
594fbe42c6 ARM: remove MULL inline asm
Reasonable gcc versions get this one right on their own.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-04 21:33:23 +01:00
Mans Rullgard
95912731c2 mathops: use MUL64 macro where it forms part of other ops
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-04 20:10:20 +01:00
Diego Biurrun
61ec024d39 Skip headers not designed to work standalone during 'make checkheaders'. 2011-06-04 18:16:38 +02:00
Diego Biurrun
8d459acc10 Add missing #includes to make headers self-contained.
This fixes 'make checkheaders'.
2011-06-04 18:15:50 +02:00
Mans Rullgard
67ace7f047 musepack: remove unnecessary #include from mpcdata.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-04 17:03:59 +01:00
Mans Rullgard
91b4941c17 musepack: remove extraneous mpcdata.h inclusions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-04 17:03:59 +01:00
Ronald S. Bultje
83a8b3002f mpegvideoenc: fix multislice fate tests with threading disabled.
The MPEG encoding code assumes that n_threads == n_slices, and thus it
should use n_slices even if threading itself is disabled.
2011-06-03 09:52:09 -07:00
Mans Rullgard
5e1166b31b Mark some variables with av_unused
Most of these variables are only used in av_dlog statements, some
are required but not used by other macros.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-03 12:59:05 +01:00
Stefano Sabatini
94bed8e582 Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().
This fixes warnings about avcodec_get_pix_fmt_name() being deprecated.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-03 13:55:55 +02:00
Baptiste Coudurier
93d06bd1df svq3: Check negative mb_type to fix potential crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-03 13:55:55 +02:00
Baptiste Coudurier
8dfc6d1f7c svq3: Move svq3-specific fields to their own context.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-03 13:55:54 +02:00
Vladimir Pantelic
c1dfb72d35 Remove unused get_psnr() prototype
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-03 11:49:32 +01:00
Diego Biurrun
f190f676bc Replace custom DEBUG preprocessor trickery by the standard one. 2011-06-03 00:44:06 +02:00
Diego Biurrun
068aa38712 vorbis: Remove non-compiling debug statement. 2011-06-03 00:44:05 +02:00
Diego Biurrun
ec6313ad86 vorbis: Remove pointless DEBUG #ifdef around debug output macros. 2011-06-03 00:44:04 +02:00
Diego Biurrun
fb52cf8267 cook: Remove non-compiling debug output.
random_state was changed from an int to a struct and can no longer be printed
as easily as before.
2011-06-03 00:44:04 +02:00
Diego Biurrun
0fc9c6554e Remove pointless #ifdefs around function declarations in a header. 2011-06-03 00:44:04 +02:00
Diego Biurrun
2366462429 Replace #ifdef + av_log() combinations by av_dlog(). 2011-06-03 00:44:03 +02:00
Diego Biurrun
df96f22d8f Replace custom debug output functions by av_dlog(). 2011-06-03 00:44:03 +02:00
Diego Biurrun
752207e36b cook: Remove unused debug functions. 2011-06-03 00:43:56 +02:00
Mans Rullgard
551dfdde70 targa: fix big-endian build 2011-06-02 21:18:04 +01:00
Mans Rullgard
e65ab9d94f Remove unused variables 2011-06-02 20:06:00 +01:00
Alexander Strange
6a9c859444 H264/MPEG frame-level multi-threading.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-02 10:16:20 -07:00
Loren Merritt
53be7b23e9 Cosmetic changes to h264_idct_10bit.asm.
Removes redundant dword tags and whitespace changes.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-02 07:07:15 -07:00
Loren Merritt
994c3550ff 2x faster h264_idct_add8_10.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-02 07:07:02 -07:00
Nathan Caldwell
cc9947ffbe aacenc: Add stereo_mode option.
ms_off is the default, until Mid/Side is no longer buggy.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-02 07:04:22 -07:00
Ronald S. Bultje
e6635a9a19 h264: remove CONFIG_GPL from x86 intra prediction code.
The authors permitted relicensing to LGPL a long time ago (Holger,
Loren and Jason).
2011-06-02 07:02:46 -07:00
Mans Rullgard
8e112df409 ARM: ac3dsp: optimised update_bap_counts()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-01 15:45:13 +01:00
Diego Biurrun
bde2c1c7fe mpegaudiodec: Fix av_dlog() invocation.
Some parameters passed to the av_dlog can be either float or int, depending on
the mode the file is being compiled as.  Cast those parameters to float and use
appropriate conversion specifiers.
2011-06-01 15:07:20 +02:00
Daniel Kang
f3aa65af3a h264/10bit: add HAVE_ALIGNED_STACK checks.
Fixes regression in 836f47d34b in ICC-10.x,
since ICC<=11.0 doesn't align stack upon function calls.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-31 21:43:20 -07:00
Daniel Kang
348493db60 Update 8-bit H.264 IDCT function names to reflect bit-depth.
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
2011-05-31 15:02:32 -07:00
Daniel Kang
836f47d34b Add IDCT functions for 10-bit H.264.
Ports the majority of IDCT functions for 10-bit H.264.

Parts are inspired from 8-bit IDCT code in Libav; other parts ported from x264 with relicensing permission from author.

Signed-off-by: Ronald S. Bultje <rbultje@google.com>
2011-05-31 15:02:32 -07:00
Diego Biurrun
7e985c9e35 mpegaudioenc: Fix broken av_dlog statement. 2011-05-31 23:45:14 +02:00
Mans Rullgard
c51695dbf6 ARM: fix MUL64 inline asm for pre-armv6
Prior to ARMv6, the destination registers of the SMULL instruction
must be distinct from the first source register.  Marking the
output early-clobber ensures it is allocated unique registers.

This restriction is dropped in ARMv6 and later, so allowing overlap
between input and output registers there might give better code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-31 22:21:00 +01:00
Mans Rullgard
fdf18e33bb mpegaudiodec: remove unusued code and variables
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-31 18:52:02 +01:00
Mans Rullgard
6f1ec38ce2 mpegaudio: clean up compute_antialias() definition
This merges the float and fixed-point versions of the compute_antialias
function, fixes invalid array indexing, and eliminates a dead copy of
csa_table.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-31 15:30:21 +01:00
Ronald S. Bultje
9ebcf7699b vp8: fix segmentation race during frame-threading.
Fixes occasional failure of make fate-vp8-test-vector-010 with
frame-multithreading enabled.
2011-05-31 07:13:34 -07:00
Mans Rullgard
6bb70dfd74 ARM: simplify inline asm with 64-bit operands
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-30 21:19:57 +01:00
Mans Rullgard
371266daa3 ARM: enable UAL syntax in asm.S
This enables UAL syntax for all asm files instead of only those
which happen to be incompatible with the old, deprecated syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-29 15:42:56 +01:00
Mans Rullgard
4276112277 vp8: use av_clip_uintp2() where possible
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-29 02:10:05 +01:00
Mans Rullgard
90da52f01f ac3enc: fix LOCAL_ALIGNED usage in count_mantissa_bits()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 21:42:31 +01:00
Justin Ruggles
70bb747a57 ac3dsp: do not use the ff_* prefix when referencing ff_ac3_bap_bits.
this should fix the windows builds

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-28 22:43:40 +03:00
Justin Ruggles
dc0ad40de2 ac3dsp: fix loop condition in ac3_update_bap_counts_c() 2011-05-28 14:41:21 -04:00
Mans Rullgard
edfa89b260 ARM: unbreak build
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 18:41:20 +01:00
Justin Ruggles
6ca23db9cc ac3enc: modify mantissa bit counting to keep bap counts for all values of bap
instead of just 0 to 4.

This does all the actual bit counting as a final step.
2011-05-28 12:39:28 -04:00
Justin Ruggles
1323828a0f ac3enc: split mantissa bit counting into a separate function.
No speed difference. This is to allow for more flexible bit counting.
2011-05-28 12:39:28 -04:00
Justin Ruggles
7743865ffc ac3enc: store per-block/channel bap pointers by reference block in a 2D array
rather than in the AC3Block struct.

This will make it easier to access the bap values without having to chase
the reference block pointers each time.
2011-05-28 12:39:28 -04:00
Mans Rullgard
e01e05ee66 get_bits: add av_unused tag to cache variable
This silences numerous compiler warnings from skip_bits(),
where the cache variable is not used.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 17:04:47 +01:00
Mans Rullgard
7d8c17b5f6 ARM: aacdec: fix constraints on inline asm
This adds output operands for modified memory allowing the
volatile qualifiers to be dropped.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 15:00:17 +01:00
Mans Rullgard
84e4804ad0 ARM: remove unnecessary volatile from inline asm
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 15:00:17 +01:00
Mans Rullgard
5726ec171b ARM: add "cc" clobbers to inline asm where needed
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 15:00:17 +01:00
Mans Rullgard
7f7726c7a2 ac3enc: use LOCAL_ALIGNED macro
Aligned local variables must use the LOCAL_ALIGNED macro to ensure
correct alignment on all systems.  The unusual size argument to
memset is required since the implementation of LOCAL_ALIGNED may
use a pointer to an array.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 15:00:16 +01:00
Stefano Sabatini
8f653e28f5 lavu: add av_get_pix_fmt_name() convenience function
Also deprecate avcodec_get_pix_fmt_name() in its favor.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-28 09:44:18 -04:00
James Zern
88aa215939 vpxenc: add VP8E_SET_STATIC_THRESHOLD mapping
via the equivalent AVCodecContext::mb_threshold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-28 12:15:59 +02:00
Justin Ruggles
1a950da6a2 cosmetics: indentation and alignment after previous commit 2011-05-27 16:25:22 -04:00
Justin Ruggles
aa47c35dff ac3enc: add support for E-AC-3 encoding.
This adds basic stream format support and allows for arbitrary bit rates
rather than just those supported in AC-3.
2011-05-27 16:25:22 -04:00
Justin Ruggles
b1bf8c7887 ac3enc: Move AC-3 AVOptions array to a separate file to make it easier to
use only selected options for the different AC-3 encoder types.
2011-05-27 16:25:22 -04:00
Mans Rullgard
79aeade6f6 ARM: disable ff_vector_fmul_vfp on VFPv3 systems
This function uses old-style vector operations deprecated in VFPv3.
Some implementations, e.g. Cortex-A9, support them only through
slow software emulation.  Cortex-A8 does have this functionality
in hardware, but as it also has NEON, this function is not used
there regardless.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-27 20:33:06 +01:00
Diego Biurrun
5e528cffcf x86: Add appropriate ifdefs around certain AVX functions.
nasm versions prior to 2.09 have trouble assembling some of our AVX code.
Protect these sections by preprocessor macros to allow compilation to pass.
2011-05-27 21:18:12 +02:00
Diego Biurrun
e169428529 Mark parameterless function declarations as 'void'. 2011-05-26 16:26:17 +02:00
Justin Ruggles
478455d66b ac3enc: initialize all coefficients to zero.
Uninitialized coefficients were being used to generate exponents, some
of which actually ended up in the final stream.  Even though, they were
just extra exponents that are not used by any decoder, it is still
better to have consistent output for testing. This also fixes valgrind
errors.
2011-05-25 20:13:49 -04:00
Alex Converse
8c51620f21 Remove h263_msmpeg4 from MpegEncContext.
It was long ago superseded by msmpeg4_version.
2011-05-25 13:24:25 -07:00
Ronald S. Bultje
e973557211 Move emms_c() from libavcodec to libavutil. 2011-05-24 14:48:49 -04:00
Stefano Sabatini
7ca5338b49 tiff: set palette in the context when specified in TIFF_PAL tag
Since image initialization was moved after tag parsing, the
palette needs to be specified in the context and then copied
to the allocated image in init_image().

Fixes a regression with TIFF images that have palette data,
trac issue #230, file Test_Flate_8bpp.tif.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-24 19:33:40 +02:00
Alexandre Colucci
d980d7b129 pgssubdec: fix incorrect colors.
On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see System Description Blu-ray Disc Read-Only Format, 9.14.4.2.2.1 Palette Definition Segment

When decoding a Blu-ray subtitle, the colors were incorrectly set.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-24 19:10:34 +02:00
Alexandre Colucci
676eaf8433 dvdsubdec: fix incorrect colors.
On DVD and HD-DVD colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see DVD Specifications for Read-Only Disc / Part 3, 4.3 Program Chain Information (7) PGC_SP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (11) PGC_SDSP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (12) PGC_HDSP_PLT
see DVD Specifications for High Definition Disc, 5.5 Presentation Data (4) SET_COLOR2

When decoding a DVD or HD-DVD subtitle, the colors were incorrectly set.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-24 19:10:28 +02:00
Anton Khirnov
b2893ee2f8 msmpeg4: reindent. 2011-05-24 12:37:51 +02:00
Anton Khirnov
57aa765971 lavc: remove msmpeg4v1 encoder.
The encoder has never produced files that could be decoded
with any software and there should be no reason to create
such files anyway.
2011-05-24 12:37:51 +02:00
Justin Ruggles
7f3a7b5c40 ac3enc: add channel coupling support
Channel coupling is an optional AC-3 feature that increases quality by
combining high frequency information from multiple channels into a
single channel. The per-channel high frequency information is sent with
less accuracy in both the frequency and time domains. This allows more
bits to be used for lower frequencies while preserving enough
information to reconstruct the high frequencies.
2011-05-24 07:52:31 +02:00
Justin Ruggles
cef7d70181 aacdec: fix typo in scalefactor clipping check 2011-05-23 15:56:52 -04:00
Felipe Contreras
b47904d158 h264: Properly set coded_{width, height} when parsing H.264.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-23 13:15:55 +02:00
Dave Yeo
a10fb79070 x86 asm: Add SECTION_TEXT to dct32_sse.asm.
This fixes the following error on OS/2:
error: segment name `.text align=16' not recognized

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-23 12:47:53 +02:00
Loren Merritt
422b2362fc dct32_sse: eliminate some spills
125->104 cycles on penryn (x86_64 only)
2011-05-22 19:27:18 +02:00
Vitor Sessak
165c7c420d Fix dct32() compilation with --disable-yasm
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-22 07:10:19 -04:00
Vitor Sessak
6204feb160 dct32: Add AVX implementation of 32-point DCT 2011-05-21 17:42:26 +02:00
Vitor Sessak
4e653b98c8 dct32: Change pass 6 permutation to allow for AVX implementation 2011-05-21 17:42:26 +02:00
Vitor Sessak
3758eb0eb9 dct32: port SSE 32-point DCT to YASM 2011-05-21 17:42:26 +02:00
Diego Biurrun
153382e1b6 multiple inclusion guard cleanup
Add missing multiple inclusion guards; clean up #endif comments;
add missing library prefixes; keep guard names consistent.
2011-05-21 13:48:10 +02:00
Ronald S. Bultje
cdca7c378e svq3: Do initialization after parsing the extradata
If done before, some parameters aren't known yet.

With svq3/rtp, initializing before some parameters are known
can lead to calling av_malloc(0), which on OS X currently returns
broken pointers.
2011-05-21 07:40:56 -04:00
Ronald S. Bultje
03c804e1ed mp3lame: add #include required for AV_RB32 macro.
Fixes compilation with mp3lame enabled.
2011-05-20 15:28:29 -04:00
Ronald S. Bultje
42da8ea8e8 LATM/AAC: Free previously initialized context on reinit.
Fixes memory leaks which are the result of overwriting already-initialized
MDCT contexts during context reinitialization, e.g. in valgrind
fate-aac-latm_000000001180bc60.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-20 18:24:53 +02:00
Dave Yeo
d69f9a4234 Add support for a.out object format to assembler macros.
This format is still used by e.g. OS/2.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-20 17:52:21 +02:00
Mans Rullgard
f255a28d14 mpegaudio: clean up #includes
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-20 11:05:19 +01:00
Mans Rullgard
0199e00bc8 mpegaudio: move all header parsing to mpegaudiodecheader.[ch]
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-20 11:05:07 +01:00
Vitor Sessak
984ece7503 qdm2: Use floating point synthesis filter.
This avoid needlessly convertion from floating point to fixed point and back.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-19 20:32:18 -04:00
Ronald S. Bultje
4e987f8282 h264: correct border check.
When backing up the top-left border, check that the top-left
(rather than left) MB indeed does belong to our slice. If it
doesn't, backing up has no positive effect but may accidentally
interfere with other threads writing in the same space.

Fixes occasional one-off effects when enabling slice-MT.
2011-05-19 20:32:18 -04:00
Ronald S. Bultje
0ffc841505 h264: fix loopfilter with threading at slice boundaries. 2011-05-19 20:32:17 -04:00
Mans Rullgard
89a2098735 Fix ff_mpa_synth_filter_fixed() prototype
The prototype should use the same typedefs as the definition, or it
will fail where int32_t is not int (DOS apparently).

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-20 01:20:53 +01:00
Diego Biurrun
4887f8245c Rename costablegen.c ---> cos_tablegen.c.
This is consistent with how all other table generation programs are named.
Moreover this ensures that the cos table generation program is correctly
deleted when cleaning the tree.
2011-05-19 21:09:02 +02:00
Diego Biurrun
9f2405661d Collapse tableprint.c into tableprint.h.
tableprint.c serves little purpose on its own and removing it allows building
the table generator programs with the normal HOSTPROGS Makefile rules.
2011-05-19 21:07:38 +02:00
Mans Rullgard
272874c9db Simplify trig table rules
This collapses the make rules for the trig tables into a pattern
rule.  Based on a patch by Diego, modified to avoid using fragile
make constructs and allow future addition of fixed-point sin tables.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 19:45:06 +01:00
Diego Biurrun
c98657a215 Remove potentially unstable filenames from comments in generated files. 2011-05-19 19:30:12 +02:00
Diego Biurrun
d9a69f730e Simplify CLEANFILES make variable by using wildcards.
Also ensures that generated file cos_fixed_tables.c is deleted on 'make clean'.
2011-05-19 19:25:11 +02:00
Mans Rullgard
0b5e44ed29 mpegaudiodsp: fix x86 and ppc makefiles
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 16:32:24 +01:00
Mans Rullgard
c2a16e44f8 mpegaudio: remove unused version of SAME_HEADER_MASK
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 14:06:25 +01:00
Mans Rullgard
d7d21c9f4b mpegaudio: remove useless #undef at end of file
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 13:30:22 +01:00
Mans Rullgard
c7bbc6cd7a mpegaudio: merge two #if CONFIG_FLOAT blocks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 12:25:36 +01:00
Mans Rullgard
918d0584a4 mpegaudio: move some struct definitions from mpegaudio.h
These structs are only used in mpegaudiodec.c, so move them there
and remove no longer needed #include lines from mpegaudio.h.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 12:25:36 +01:00
Mans Rullgard
c4f5c2d6f4 Move some mpegaudio functions to new mpegaudiodsp subsystem
This separation allows these functions to be used in a cleaner
fashion from other codecs (e.g. qdm2) and simplifies creating
optimised versions of them.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-19 12:25:34 +01:00
Diego Biurrun
a2077b85da g729: Merge g729.h into g729dec.c.
The header contains just a single define that is only used in g729dec.c.
2011-05-19 10:21:37 +02:00
Justin Ruggles
e98a95e779 10l: wrap float_interleave functions in HAVE_YASM.
fixes compilation with --disable-yasm
2011-05-18 20:18:08 -04:00
Justin Ruggles
9aa8193a23 Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis
decoders.

Based on patches by clsid2 in ffdshow-tryout.
2011-05-18 17:27:06 -04:00
Justin Ruggles
64150ff014 Add request_sample_fmt field to AVCodecContext.
This will allow audio decoders to support output of different sample formats
as a runtime option.
2011-05-18 17:27:06 -04:00
Justin Ruggles
32f8fb8ecf Add float_interleave() to FmtConvertContext with x86-optimized versions.
Partially based on patches by clsid2 in ffdshow-tryout.
ff_float_interleave6() x86 improvements by Loren Merrit.
2011-05-18 17:27:05 -04:00
Mans Rullgard
a06bf6368b mpegaudiodec: remove decode_end() function
This function is not needed since 721d6f2dc5 removed the DCT table
allocations for the configuration used here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-18 15:38:19 +01:00
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
Justin Ruggles
a1d0f511fc ac3enc: remove bandwidth reduction as fallback for bit allocation failure.
It was only needed at low bitrates, which now already use a low bandwidth, so
the bandwidth reduction is no longer needed.
2011-05-01 13:32:04 -04:00
Justin Ruggles
ba6bce5140 ac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy() 2011-05-01 13:32:04 -04:00
Justin Ruggles
4142487d1c ac3enc: return error if frame+exponent bits are too large instead of using
av_assert2().

This can occur in some very rare cases with low bitrates.
2011-05-01 13:32:03 -04:00
Justin Ruggles
987fe2dc55 ac3enc: differentiate between current block and reference block in bit_alloc() 2011-05-01 13:32:03 -04:00
Justin Ruggles
6b2636bba6 ac3enc: simplify exponent_init() by calculating exponent_group_tab[] based
on exponent group sizes.
2011-05-01 13:32:03 -04:00
Justin Ruggles
e0b33d479c ac3enc: simplify stereo rematrixing decision options 2011-05-01 13:32:03 -04:00
Michael Niedermayer
7089265756 AMV: disable DR1 and don't override EMU_EDGE
This works around a possibly exploitable crash.
Appearently, vlc can be exploited with a malicous file. This should get
reverted as soon as a proper fix is found.

Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 89f903b3d5)
(cherry picked from commit 9b919571e5)
2011-04-29 22:46:13 +02:00
Diego Biurrun
cf3ac54339 vorbis: 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-04-29 20:28:40 +02:00
Diego Biurrun
a734fa575f Remove disabled non-optimized code variants. 2011-04-29 20:01:13 +02:00
Diego Biurrun
2e15305b70 Remove some disabled printf debug cruft. 2011-04-29 20:00:53 +02:00
Diego Biurrun
09cbf60f8e Replace more disabled printf() calls by av_dlog(). 2011-04-29 20:00:41 +02:00
Diego Biurrun
045dd4b928 Replace some commented-out debug printf() / av_log() messages with av_dlog(). 2011-04-29 17:27:01 +02:00
Diego Biurrun
d1be646e90 vorbisdec: Replace some sizeof(type) by sizeof(*variable). 2011-04-29 15:37:06 +02:00
Stefano Sabatini
62d33dbc17 mpeg12: terminate mpeg2_video_profiles arrays
Make av_get_profile_name() return NULL if no profile is detected.

Fix trac issue #130, fix crash reading file tek3.m2v.
(cherry picked from commit e5d80c7b2d)

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-28 11:07:31 +02:00
Peter Ross
87e45ae13d rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-28 07:25:28 +02:00
Diego Biurrun
b239526873 vorbisdec: Rename silly "class_" variable to plain "class". 2011-04-27 19:54:55 +02:00
Diego Biurrun
81afa5a274 simple_idct_alpha: Drop some useless casts. 2011-04-27 19:52:48 +02:00
Diego Biurrun
3fd3632ffe Simplify av_log_missing_feature().
Do not print the results of the conditional call to av_log_ask_for_sample()
into the same line as the main output, separate the already long text.
2011-04-27 19:48:58 +02:00
Justin Ruggles
8745e9c458 ac3enc: remove check for mismatching channels and channel_layout 2011-04-27 12:57:43 -04:00
Justin Ruggles
688b09fa59 If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
non-zero, set channels based on channel_layout.

This allows the user to set only channel_layout and not channels.
2011-04-27 12:57:43 -04:00
Justin Ruggles
168f9e8c40 If AVCodecContext.channel_layout and AVCodecContext.channels are both
non-zero, check to make sure they do not contradict eachother.
2011-04-27 12:57:43 -04:00
Justin Ruggles
3dfc3e70c0 cosmetics: indentation 2011-04-27 12:57:43 -04:00
Justin Ruggles
8b00ab0113 Check AVCodec.supported_samplerates and AVCodec.channel_layouts in
avcodec_open().

If the encoder has a channel_layouts list and AVCodecContext.channel_layout
is 0, then only print a warning and let the encoder decide how to handle it.
2011-04-27 12:57:42 -04:00
Alex Converse
767848d761 aacdec: remove sf_scale and sf_offset.
Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.
2011-04-27 12:39:37 -04:00
Justin Ruggles
6271794041 aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.
2011-04-27 12:39:37 -04:00
Alex Converse
d70fa4c423 Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.
2011-04-27 12:39:37 -04:00
Alex Converse
e4744b59aa Large intensity stereo and PNS indices are legal. Clip them instead of
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.

None of the conformance streams fall in the range that need to be clipped.
2011-04-27 12:39:37 -04:00
Stefano Sabatini
f4e043ff63 qpeg: use reget_buffer() in decode_frame()
Decoder relies on previous frame data, so use reget_buffer().

This also set frame->reference to 3, as the frame will be requested
unmodified later so it shouldn't be modified by the application.

Fix playback of file Clock.avi.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:44:40 -07:00
Stefano Sabatini
4f0b80599a ultimotion: use reget_buffer() in ulti_decode_frame()
Decoder relies on previous frame data, so use reget_buffer().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:42:42 -07:00
Stefano Sabatini
4f2954e232 smacker: remove unnecessary call to avctx->release_buffer in decode_frame()
The release_buffer was cleaning the provided frame, thus causing the
successive call to avctx->reget_buffer() to allocate a new frame.  In
case the returned frame was not the same one previously returned but a
new one with different data, it resulted in artifacts.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:41:59 -07:00
Ronald S. Bultje
5eef4afb9a avparser: don't av_malloc(0).
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-26 22:07:17 -07:00
Justin Ruggles
79ee8977c2 ac3enc: correct the flipped sign in the ac3_fixed encoder 2011-04-26 17:19:37 -04:00
Diego Biurrun
e6ff064845 Eliminate pointless '#if 1' statements without matching '#else'. 2011-04-26 20:18:27 +02:00
Vitor Sessak
9d35fa520e Add AVX FFT implementation.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:25:24 +02:00
Vitor Sessak
33cbfa6fa3 Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:18:22 +02:00
Michael Niedermayer
76cd98b445 mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
2011-04-26 09:29:08 +02:00
Stefano Sabatini
bebe72f4a0 lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
Also deprecate av_get_pict_type_char() in favor of
av_get_picture_type_char().

The new enum and av_get_picture_type_char() are defined in libavutil.
This allows the use in libavfilter without the need to link against
libavcodec.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:38:57 +02:00
Michael Niedermayer
30fe971934 aac: add headers needed for log2f()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:33:21 +02:00
Anton Khirnov
6deae83e55 lavc: remove FF_API_MB_Q cruft 2011-04-26 08:16:06 +02:00
Anton Khirnov
694c142434 lavc: remove FF_API_RATE_EMU cruft 2011-04-26 08:16:05 +02:00
Anton Khirnov
e7021c0ed5 lavc: remove FF_API_HURRY_UP cruft 2011-04-26 08:16:05 +02:00
Janne Grunau
6ad2bafcfd ac3: fix memleak in fixed-point encoder
caused by typo in mdct_end
2011-04-25 20:27:05 +02:00
Diego Biurrun
a14c08247d flashsv: Return more meaningful error values. 2011-04-25 16:01:58 +02:00
Diego Biurrun
46cb2da1f0 flashsv: Employ explicit AVCodec struct initializers. 2011-04-25 15:41:10 +02:00
Diego Biurrun
293fe6da01 cosmetics: K&R coding style and more whitespace for Flash Screen Video 2011-04-25 01:50:07 +02:00
Diego Biurrun
2441003d3f vorbisdec: Employ proper printf format specifiers for uint_fast32_t.
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘uint_fast32_t’
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘uint_fast32_t’
2011-04-25 01:39:55 +02:00
Diego Biurrun
43fb279f56 Replace more FFmpeg instances by Libav or ffmpeg. 2011-04-23 19:12:23 +02:00
Diego Biurrun
046f3cb789 vorbis: Rename decoder/encoder files to follow general file naming scheme. 2011-04-23 14:23:20 +02:00
Nathan Caldwell
f50d937725 aacenc: Fix whitespace after last commit.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-23 15:02:34 +03:00
Diego Biurrun
62582a696b cook: Fix small typo in av_log_ask_for_sample message. 2011-04-23 12:05:32 +02:00
Nathan Caldwell
230c1a9075 aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
There is still are still a few sections missing relating to TNS (not present)
and mid/side (contains other bugs).

Overall this improves quality, and vastly improves rate-control.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-23 12:30:05 +03:00
Alex Converse
785c441828 Add some debug log messages to AAC extradata
On Wed, Apr 20, 2011 at 11:39 AM, Justin Ruggles
<justin.ruggles@gmail.com> wrote:
> On 04/20/2011 02:26 PM, Alex Converse wrote:
>
>> ---
>>  libavcodec/aacdec.c |   10 +++++++++-
>>  1 files changed, 9 insertions(+), 1 deletions(-)
>>
>>
>>
>> 0002-Add-some-Debug-log-messages-to-AAC-extradata.patch
>>
>>
>> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
>> index c9761a1..3ec274f 100644
>> --- a/libavcodec/aacdec.c
>> +++ b/libavcodec/aacdec.c
>> @@ -79,7 +79,6 @@
>>             Parametric Stereo.
>>   */
>>
>> -
>>  #include "avcodec.h"
>>  #include "internal.h"
>>  #include "get_bits.h"
>
>
> stray whitespace change
>

oops, fixed

>From 94e8d0eea77480630f84368c97646cabc0f50628 Mon Sep 17 00:00:00 2001
From: Alex Converse <aconverse@google.com>
Date: Wed, 20 Apr 2011 11:23:34 -0700
Subject: [PATCH] Add some debug log messages to AAC extradata
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1"

This is a multi-part message in MIME format.
--------------1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
2011-04-22 20:36:57 -07:00
Diego Biurrun
d9dee728b8 Use av_log_ask_for_sample() to request samples from users. 2011-04-22 20:12:39 +02:00
Diego Biurrun
44f566b79a Make av_log_ask_for_sample() accept a variable number of arguments. 2011-04-22 20:12:27 +02:00
Diego Biurrun
b2832c3904 vqavideo: We no longer need to ask for version 1 samples. 2011-04-22 20:02:24 +02:00
Young Han Lee
9978ed7d6c aacdec: indentation cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-22 14:47:47 +02:00
Ronald S. Bultje
94f7451a3a Introduce slice threads flag.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-21 19:42:19 -04:00
Diego Biurrun
70fb031ce2 Use av_log_ask_for_sample() where appropriate. 2011-04-21 19:58:54 +02:00
Anton Khirnov
65af48b559 lavc: provide deprecated avcodec_thread_init until next major version
It was deprecated only recently.
2011-04-21 07:22:23 +02:00
Anton Khirnov
095290f9a4 lavc: provide the opt.h header until the next bump
AVOptions were moved to libavutil only recently.
2011-04-21 07:14:51 +02:00
Justin Ruggles
31d76ec288 In avcodec_open(), set return code to an error value only when an error occurs
instead of unconditionally at the start of the function.

This fixes a bug where a successful call to ff_thread_init() masks errors that
occur after that point in the function.  It also makes future bugs like this
less likely since the error code is now set near to the point in the code
where the error is found.
2011-04-19 14:10:03 -04:00
Anton Khirnov
cda7aa9eba lavc: remove reference to opt.h from Makefile.
Fixes make install after 3453a231a6.
2011-04-19 19:50:23 +02:00
Anton Khirnov
3453a231a6 lavc: remove misc disabled cruft. 2011-04-19 19:01:22 +02:00
Anton Khirnov
251cf997cf lavc: remove the FF_API_INOFFICIAL cruft. 2011-04-19 18:41:32 +02:00
Anton Khirnov
41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov
01a4259b8d lavc: remove the FF_API_USE_LPC cruft. 2011-04-19 18:40:35 +02:00
Anton Khirnov
db4d3a7421 lavc: remove the FF_API_SUBTITLE_OLD cruft. 2011-04-19 18:39:40 +02:00
Anton Khirnov
e89e5afdd0 lavc: remove the FF_API_VIDEO_OLD cruft. 2011-04-19 18:37:21 +02:00
Anton Khirnov
9b4f1cdb6a lavc: remove the FF_API_AUDIO_OLD cruft. 2011-04-19 18:37:03 +02:00
Anton Khirnov
20d33ee8b1 lavc: remove the FF_API_OPT_SHOW cruft. 2011-04-19 18:36:15 +02:00
Anton Khirnov
42420e7b94 lavc: remove the FF_API_MM_FLAGS cruft. 2011-04-19 18:35:56 +02:00
Diego Biurrun
151cd4f982 pcm: Add const to cast in ENCODE macro.
This fixes a lot of warnings of the sort:
libavcodec/pcm.c:105: warning: cast discards qualifiers from pointer target type
2011-04-19 16:18:59 +02:00
Luca Barbato
facc48f157 libvo-aacenc,libvo-amrwbenc}: fix api usage
Use the correct error codes and format identifier.
2011-04-18 22:21:13 +02:00
Anton Khirnov
139f3ac42d Bump major versions of all libraries.
They've accumulated enough new APIs and corresponding deprecated cruft.

This breaks API and ABI.
2011-04-18 20:19:47 +02:00
Diego Biurrun
f0a41afd8a Replace mplayerhq.hu URLs by libav.org. 2011-04-18 18:23:16 +02:00
Diego Biurrun
259a3e70ed ptx: Use av_log_ask_for_sample() where appropriate. 2011-04-18 09:41:02 +02:00
Diego Biurrun
6001dad6e2 Replace more FFmpeg references by Libav. 2011-04-17 19:31:49 +02:00
Justin Ruggles
4c64c8e95a ac3dec: fix processing of delta bit allocation information.
The number of dba segments is the coded value + 1.
The coupling dba offset starts at the first coupling band, not at zero.
2011-04-17 12:33:41 -04:00
Ronald S. Bultje
0b05864eef vc1: fix fate-vc1 after previous commit.
PROFILE_ADVANCED doesn't set res_fasttx, so make that a special case
in the condition that decides which IDCT to use (and whether to read
coefficients transposed or not).

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2011-04-17 08:45:10 +02:00
Ronald S. Bultje
58bb6b7d93 wmv3dec: fix playback of complex WMV3 files using simple_idct.
IDCT coefficients are read transposed, but simple_idct does not expect
this. Therefore, only do tranposed coefficient reading if we're not
using simple_idct.

Fixes http://forum.videolan.org/viewtopic.php?f=14&t=89651
2011-04-16 15:19:53 -04:00
Kostya Shishkov
c0eee89337 make av_dup_packet() more cautious on allocation failures
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-15 18:02:05 +02:00
Kostya Shishkov
2d8591c27e make containers pass palette change in AVPacket
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-15 18:02:05 +02:00
Kostya Shishkov
4de339e219 introduce side information for AVPacket
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-15 18:01:53 +02:00
Martin Storsjö
302152d40b libavcodec: Bump micro after adding the dtx AVOptions
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-14 09:34:26 +03:00
Martin Storsjö
651b276ef7 libopencore-amr, libvo-amrwbenc: Allow enabling DTX via private AVOptions
DTX, discontinuous transmission, allows emitting frames with
comfort noise when no voice is detected in the input audio.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-14 00:31:39 +03:00
Martin Storsjö
3dd82afc74 libopencore-amr, libvo-amrwbenc: Only check the bitrate when changed
Also rename the incorrectly named enc_bitrate to enc_mode, use the
enc_bitrate variable for storing the last chosen bitrate.

This avoids continuous warning log messages if not using an
exactly matching bitrate, while still allowing changing bitrate
at any point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-14 00:31:34 +03:00
Martin Storsjö
7073938121 libopencore-amr, libvo-amrwbenc: Find the closest matching bitrate
Dynamically print the supported bitrates from the local table,
instead of using a hardcoded log message.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-14 00:31:33 +03:00
Martin Storsjö
957635ba14 libvo-*: Fix up the long codec names
Include VisualOn to clarify the codec name, but remove the
actual library name from the user-friendly description.
Also mention Android, to clarify which VisualOn implementation
this refers to, since they do sell other variants of the same
code, too.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 22:38:18 +03:00
Martin Storsjö
567ad0e31d libavcodec: Mark AVCodec->priv_class const
This avoids warnings of this kind, everywhere priv_class
is initialized:

warning: initialization discards qualifiers from pointer target type

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 22:14:33 +03:00
Martin Storsjö
2d3267936a libvo-aacenc: Only produce extradata if the global header flag is set
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 15:43:46 +03:00
Anton Khirnov
c776732712 lavc: postpone removal of request_channels
No decoder uses the supposed replacement, request_channel_layout, yet.
2011-04-13 13:50:17 +02:00
Anton Khirnov
d6ead39ee7 lavc: postpone removal of audioconvert and sample_fmt wrappers
Those were moved to libavutil only recently.
2011-04-13 13:50:17 +02:00
Martin Storsjö
882221afde libopencore-amr: Cosmetics: Rewrap and align
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 13:00:21 +03:00
Martin Storsjö
02c63a109f libopencore-amr, libvo-amrbwenc: Rename variables and functions
Avoid camelCase names for functions and variables.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 13:00:14 +03:00
Martin Storsjö
9b9c6405fd libopencore-amr: Convert commented out debug logging into av_dlog
Also add the avctx as logging context.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 13:00:07 +03:00
Martin Storsjö
89e7e640f7 libopencore-amr: Remove an unused state variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 12:59:58 +03:00
Martin Storsjö
5d211e034e libvo-amrwbenc: Don't explicitly store bitrate modes in the bitrate table
The bitrate modes are equal to the array indices.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
0e03f94d61 libopencore-amr: Remove a useless local variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
c48ce4eb50 libopencore-amr, libvo-amrwbenc: Make the bitrate/mode mapping array static const
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
900a129f4f libopencore-amr, libvo-amrwbenc: Return proper error codes in most places
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
a8ec07c933 libopencore-amr: Don't print carriage returns in log messages
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
587331414b libopencore-amr: Remove an old workaround for libamr header weirdness
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
57ddffe843 libopencore-amr: Make the opaque encoder pointer a void*
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Martin Storsjö
dbff4da914 libopencore-amr: Remove unused code fragments
This parts are heritage from the encoder part from the old
libamr code removed in SVN rev 19365.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:38 +03:00
Alberto Delmas
d294015510 Check for successful h263 init in msmpeg4 init
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-12 19:46:44 -04:00
Martin Storsjö
c5e03cebd3 libvo-*: Don't use deprecated sample format names and enum names
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-12 12:52:47 +03:00
Martin Storsjö
c41eb2ade4 libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-12 12:38:37 +03:00
Alex Converse
2f072b55a4 Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.
(1<<31) is undefined and seems to be evaluated by gcc to -2^31 when
these formulae require 2^31.

These conversions still need fate tests.
2011-04-11 21:47:53 -07:00
Alex Converse
187a537904 Convert some undefined 1<<31 shifts into 1U<<31.
According to ISO 9899:1999 S 6.5.7/4:

The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
are filled with zeros. If E1 has an unsigned type, the value of the
result is E1× 2^E2, reduced modulo one more than the maximum value
representable in the result type. If E1 has a signed type and
nonnegative value, and E1× 2^E2 is representable in the result type, then
that is the resulting value; otherwise, the behavior is undefined.
2011-04-11 21:47:42 -07:00
Martin Storsjö
f502ff3f61 Add support for AMR-WB encoding via libvo-amrwbenc
The wrapper code is based on the libamr wrapper removed in SVN rev 19365.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-11 14:55:53 +03:00
Martin Storsjö
d89e738a0c Add an AAC encoder by using the libvo-aacenc library
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-11 14:55:51 +03:00
Martin Storsjö
029f966c3a g722: Return 8 bits per sample for g722 in av_get_bits_per_sample
This fixes a failing assert in ff_raw_read_header (in
fate-g722dec-1), where bits_per_coded_sample is set using this
function and is required to have a positive value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-11 11:35:43 +03:00
Alberto Delmás
768c525114 Parse sprite data for WMVP and WVP2, and decode sprites for the latter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-10 10:07:49 +02:00
Alexander Strange
cf39b461d3 pthread: validate_thread_parameters() ignored slice-threading being intentionally off
The thread_type API allows you to request only FF_THREAD_FRAME (instead of
FRAME | SLICE), but it was being ignored.
We don't implement both of them at the same time, so there isn't an effect
on current codecs, except that you can request no kinds of threading now
(a bit useless).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-09 08:23:22 -04:00
Reimar Döffinger
f82163cf1c Use consistent condition for whether to run slice-threading execute function.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-09 08:23:22 -04:00
Gwenole Beauchesne
da21440d46 vaapi: cope with VA-API 0.32, i.e. fix VC-1 decoding on Sandy Bridge.
(cherry picked from commit a18e7b4fb7)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-09 12:02:04 +02:00
Gwenole Beauchesne
09ce846206 vaapi: filter out DELAYED_PIC_REF flag to determine field.
This fixes ticket #23.

(cherry picked from commit 621f4c98df)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-09 12:00:57 +02:00
Anton Khirnov
9f5ddd1e46 lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
And hide request_channels AVOption under it.
2011-04-07 18:11:24 +02:00
Brad
1f6265e011 Fix parser: mark av_parser_parse() for removal on next major bump
Fix the breakage introduced with 9073ca6c6e
2011-04-06 23:45:34 +02:00
Nathan Caldwell
5371803dd5 psymodel: extend API to include PE and bit allocation.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-05 22:21:04 +02:00
Alexander Strange
ba9ef8d04e Remove unnecessary parameter from ff_thread_init() and fix behavior
thread_count passed to ff_thread_init() is only used to set AVCodecContext.
thread_count, and can be removed. Instead move it to the legacy implementation
of avcodec_thread_init().

This also fixes the problem that calling avcodec_thread_init() with pthreads
enabled did not set it since ff1efc524c.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-05 16:53:26 +02:00
Janne Grunau
d6f66edd65 Revert "aac_latm_dec: use aac context and aac m4ac"
This reverts commit 36864ac354 since it
breaks LATM decoding in ffplay.
2011-04-05 12:21:50 +02:00
Mans Rullgard
5f2e6c0fd1 ac3enc: NEON optimised extract_exponents
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-05 01:11:16 +01:00
Mans Rullgard
2310ee4b1c ac3enc: move extract_exponents inner loop to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-04 18:27:22 +01:00
Young Han Lee
57cc1ad35f aacenc: reduce the number of loop index variables
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-04 09:12:37 +02:00
Justin Ruggles
e05a3ac713 ac3enc: select bandwidth based on bit rate, sample rate, and number of
full-bandwidth channels.

This reduces high-frequency artifacts and improves the quality of the lower
frequency audio at low bit rates.
2011-04-03 20:59:14 -04:00
Mans Rullgard
f7653904c8 ARM: NEON fixed-point forward MDCT
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 22:39:52 +01:00
Mans Rullgard
dba9852935 ARM: NEON fixed-point FFT
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 22:39:52 +01:00
Mans Rullgard
79997def65 ac3enc: use generic fixed-point mdct
This makes the AC3 encoder use the shared fixed-point MDCT rather
than its own implementation.  The checksum changes are due to
different rounding in the MDCT.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 19:01:53 +01:00
Anton Khirnov
4e3945fd28 lavc: deprecate AVCodecContext.antialias_algo
It's been unused since mp3float decoder was added.
2011-04-03 08:43:11 +02:00
Anton Khirnov
4a49d2d59c lavc: mark mb_qmin/mb_qmax for removal on next major bump.
They've been unused and deprecated for about five years.
2011-04-03 08:43:09 +02:00
Mans Rullgard
bc154882e1 Fixed-point MDCT with 32-bit unscaled output
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-02 21:06:07 +01:00
Anton Khirnov
ed5fcd60b2 lavc: deprecate rate_emu
It's not used anywhere and apparrently hasn't been for a very long time.
2011-04-02 16:18:37 +02:00
Anton Khirnov
8ed2ae09a2 lavc: mark hurry_up for removal on next major bump
It has been deprecated for about five years, skip_idct/skip_frame should
be used instead.
2011-04-02 16:17:24 +02:00
Anton Khirnov
9073ca6c6e parser: mark av_parser_parse() for removal on next major bump
Fixes build with the bump, since the prototype is already marked for
removal.
2011-04-02 16:17:15 +02:00
Anton Khirnov
6f3d3eacf6 lavc: add missing audioconvert includes 2011-04-02 16:17:01 +02:00
Anton Khirnov
b4b167ecbf jvdec: don't use deprecated CODEC_TYPE_*/PKT_FLAG_KEY 2011-04-02 16:16:44 +02:00
Mans Rullgard
aa05f2126e ac3enc: ARM optimised ac3_compute_matissa_size
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 22:46:21 +01:00
Mans Rullgard
182826c884 ac3: armv6 optimised bit_alloc_calc_bap
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 22:46:05 +01:00
Mans Rullgard
41327cca61 FFT: simplify fft8()
Part of the fft8() function corresponds to the BUTTERFLIES macro,
so use it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 17:50:59 +01:00
Mans Rullgard
6efe6028ed Fixed-point support in fft-test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 15:16:06 +01:00
Mans Rullgard
7087ce08c8 Fixed-point FFT and MDCT 2011-03-31 12:01:27 +01:00
Mans Rullgard
7f6e05cdfd ac3enc: simplify sym_quant()
These expressions are equivalent since levels is always odd, and
overflow is impossible due to the constraints set by the assert().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-31 12:01:27 +01:00
John Stebbins
4b6f097b21 mlp_parse.c: set AVCodecContext channel_layout
The channel layout isn't getting set for mlp and truehd audio.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 17:41:48 +02:00
anatoly
ce02f9becf Add MxPEG decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
e0e3b8b297 Add support for picture_ptr field in MJpegDecodeContext
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
f16055eedf Move MJPEG's input buffer preprocessing in separate public function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
8f0bd2c07d Support reference picture defined by bitmask in MJPEG's SOS decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
Mans Rullgard
52fd16a264 ac3enc: move compute_mantissa_size() to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-30 01:21:56 +01:00
Mans Rullgard
6f718471ea ac3enc: move mant*_cnt and qmant*_ptr out of AC3EncodeContext
These fields are only used in quantize_mantissas() and reset
on each call, no need to store them in the main context.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-30 00:38:45 +01:00
Mans Rullgard
d782bca415 ac3enc: NEON optimised float_to_fixed24
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-29 19:40:13 +01:00
Mans Rullgard
6d9f52b2cd ac3: move ff_ac3_bit_alloc_calc_bap to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-29 19:31:45 +01:00
Ronald S. Bultje
d38345878c dfa: protect pointer range checks against overflows. 2011-03-29 07:14:44 -07:00
Alexander Strange
a75529e81e mimic: implement multithreading. 2011-03-28 21:50:46 -07:00
Justin Ruggles
c4549bd66a ac3enc: avoid memcpy() of exponents and baps in EXP_REUSE case by using
exponent reference blocks.
2011-03-28 14:46:17 -04:00
Kostya Shishkov
42315dabce Chronomaster DFA decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-28 16:55:03 +02:00
Justin Ruggles
991f3de1bb ac3enc: Add codec-specific options for writing AC-3 metadata. 2011-03-27 11:30:09 -04:00
Alexander Strange
1500be13f2 dsputil: allow to skip drawing of top/bottom edges. 2011-03-26 17:45:38 -04:00
Justin Ruggles
be18738801 Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser
and decoder, and vice-versa for the AC-3 encoder.
2011-03-25 16:59:00 -04:00
Justin Ruggles
34b47d7cbc Add audio_service_type field to AVCodecContext for encoding and reporting
of the service type in the audio bitstream.
2011-03-25 16:51:53 -04:00
Young Han Lee
00f0b4b92e aacenc: indentation 2011-03-24 21:13:29 -07:00
Young Han Lee
92efa2bdd9 aacenc: fix the side calculation in search_for_ms 2011-03-24 21:12:23 -07:00
Alexander Strange
66f608a6aa vp8.c: rename EDGE_* to VP8_EDGE_*. 2011-03-24 21:48:18 -04:00
Mans Rullgard
d743065e18 ARM: fix ff_apply_window_int16_neon() prototype
The length argument should be unsigned.  No change in code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-24 20:43:47 +00:00
Mans Rullgard
2d3b21ffb9 ARM: NEON optimised apply_window_int16()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-24 19:24:03 +00:00
Mans Rullgard
245c78313f ac3enc: NEON optimised shift functions 2011-03-24 16:30:54 +00:00
Mans Rullgard
f4855a904e ac3enc: NEON optimised ac3_max_msb_abs_int16 and ac3_exponent_min 2011-03-24 16:30:49 +00:00
Ronald S. Bultje
f711424969 mpeg12.c: fix slice threading for mpeg2 field picture mode.
Fixes "make THREADS=2 fate-mpeg2-field-enc".
2011-03-24 12:16:22 -04:00
Anton Khirnov
3dd851c46b lavc: move the version macros to a new installed header.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-22 21:48:33 -04:00
Justin Ruggles
e6e9823488 Add apply_window_int16() to DSPContext with x86-optimized versions and use it
in the ac3_fixed encoder.
2011-03-22 21:08:30 -04:00
Vitor Sessak
ee26abf2a4 Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-22 18:26:46 -04:00
Kieran Kunhya
a6d2227bc8 Add kbdwin.o to AC3 decoder
Fixes --disable-everything --enable-decoder=ac3

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-22 22:26:20 +00:00
Reimar Döffinger
4c886d613d Detect byte-swapped AC-3 and support decoding it directly.
This allows the AC-3 decoder to be used directly with RealMedia
decoders that unlike the libavformat one do not byte-swap automatically.
Since the new code is only used in case we would fail directly otherwise
there should be no risk for regressions.
2011-03-22 15:36:47 -04:00
Justin Ruggles
40728b5169 cosmetics: indentation 2011-03-22 15:36:47 -04:00
Justin Ruggles
67fc8652b9 Always copy input data for AC3 decoder.
Depending on error_recognition is not correct, low values do
certainly not mean it is ok to crash.

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-03-22 15:36:47 -04:00
Justin Ruggles
85ab290470 ac3enc: make sym_quant() branch-free 2011-03-22 14:36:18 -04:00
Ronald S. Bultje
c47d383502 vc1: make P-frame deblock filter bit-exact. 2011-03-21 21:28:17 -04:00
Ronald S. Bultje
f44d6445b7 vc1: slice support.
Also reset coded_block at each new slice, fixes problems in slice playback.
2011-03-21 10:00:43 -04:00
Ronald S. Bultje
b81a935bd9 vc1: fix up memleaks in the error codepath.
Introduce end: and err: labels at the end of vc1_decode_frame(), which
will clean up allocated memory consistently.
2011-03-21 09:51:16 -04:00
Ronald S. Bultje
72452cc475 vc1: warn for unimplemented pan-scan feature. 2011-03-21 09:43:21 -04:00
Mans Rullgard
027f60f32b ffv1: allocate correct size for sample buffer
This fixes a typo in the size calculation for the sample buffer
introduced in cbabccc367.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 22:17:20 +00:00
Mans Rullgard
e87a6f0dc9 Move ff_dct_init_mmx declaration to dct.h
This was missed in 0aded94.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 21:12:00 +00:00
Mans Rullgard
8eec00278c dct: remove superflous #include
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 17:15:41 +00:00
Mans Rullgard
0aded9484d Move dct and rdft definitions to separate files
This leaves fft.h with only the core FFT and MDCT definitions
thus making it more managable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 17:15:33 +00:00
Mans Rullgard
4538729afe Move sine windows to a separate file
These windows do not really belong in fft/mdct files and were
easily confused with the similarly named tables used by rdft.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 13:25:19 +00:00
Mans Rullgard
a45fbda994 Move ff_kbd_window_init() to a separate file
This function is not tightly coupled to mdct, and it's in the way
of making a fixed-point mdct implementation.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 19:49:27 +00:00
Mans Rullgard
26f548bb59 fft: remove inline wrappers for function pointers
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 19:49:18 +00:00
Mans Rullgard
42cfb3835b Remove Sonic experimental audio codec
Since initially committed in 2004, this codec has only been touched
for maintenanance.  Functionally, it contains no novel ideas and
its intended audience is better served by existing mature codecs.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 15:24:31 +00:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Nathan Caldwell
350785a662 aacenc: 10l, missed a reference when refactoring the psymodel. 2011-03-17 21:01:08 -07:00
Justin Ruggles
0f999cfddb ac3enc: add float_to_fixed24() with x86-optimized versions to AC3DSPContext
and use in scale_coefficients() for the floating-point AC-3 encoder.
2011-03-17 16:46:48 -04:00
Nathan Caldwell
4afedfd8e5 aacenc: cosmetics, indentation, and comment clarification
Correct bad indentation in aaccoder
Clarify and correct comments in 3GPP psymodel, other cosmetics.
2011-03-16 23:35:39 -04:00
Nathan Caldwell
b7c96769c5 aacenc: Refactor the parts of the AAC psymodel.
3GPP:
Remove ffac from and move min_snr out of AacPsyBand.
Rearrange AacPsyCoeffs to make it easier to implement energy spreading.
Rename the band[] array to bands[]
Copy energies and thresholds at the end of analysis.

LAME:
Use a loop instead of an if chain in LAME windowing.
2011-03-16 23:34:12 -04:00
Young Han Lee
f578854efc aaccoder: Change FFMAX for allzero flag to OR bit operation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 23:12:43 -04:00
Ramiro Polla
cbf5d22d24 Remove occurrences of my old email address
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-16 23:19:40 +00:00
Mans Rullgard
381d37fda9 dsputil: add bswap16_buf()
There are several places where a buffer is byte-swapped in 16-bit units.
This allows them to share code which can be optimised for various
architectures.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-16 23:19:40 +00:00
Janne Grunau
a03be6e1ba use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_* 2011-03-16 21:54:39 +01:00
Janne Grunau
29ba091136 replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION
also update the multiple inclusion guards in config.h|mak
2011-03-16 21:54:39 +01:00
Justin Ruggles
79414257e2 mathops: fix MULL() when the compiler does not inline the function.
If the function is not inlined, an immmediate cannot be used for the
shift parameter, so the %cl register must be used instead in that case.

This fixes compilation for x86-32 using gcc with --disable-optimizations.
2011-03-15 20:49:37 -04:00
Justin Ruggles
aaff3b312e mathops: change "g" constraint to "rm" in x86-32 version of MUL64().
The 1-arg imul instruction cannot take an immediate argument, only a register
or memory argument.
2011-03-15 13:43:47 -04:00
Justin Ruggles
b181b8fb96 mathops: convert MULL/MULH/MUL64 to inline functions rather than macros.
This fixes unexpected name collisions that were occurring with variables
declared within the macros.
It also fixes the fate-acodec-ac3_fixed regression test on x86-32.
2011-03-15 13:43:47 -04:00
Philip Langdale
025225d7ee h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PPS units.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 07:20:44 -04:00
Justin Ruggles
f1efbca5e9 ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder. 2011-03-14 08:45:31 -04:00
Justin
323e6fead0 ac3enc: do not right-shift fixed-point coefficients in the final MDCT stage.
This increases the accuracy of coefficients, leading to improved quality.
Rescaling of the coefficients to full 25-bit accuracy is done rather than
offsetting the exponent values. This requires coefficient scaling to be done
before determining the rematrixing strategy. Also, the rematrixing strategy
calculation must use 64-bit math to prevent overflow due to the higher
precision coefficients.
2011-03-14 08:45:26 -04:00
Peter Ross
6e7cf13b6b mm decoder: move buffer allocation from decode_init() to decode_frame()
This permits playback in ffplay when libavfilter is enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:07:29 -04:00
Peter Ross
0697440c1e Bitmap Brothers JV video decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:05:01 -04:00
Johan Andersson
21de920472 Update the url to the site website and change ffmpeg-devel to libav-devel
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-13 18:45:29 -04:00
Jason Garrett-Glaser
81a131312d VP8: fix other function declaration
Was missed in 3efbe137.
2011-03-12 15:36:15 -08:00
Hendrik Leppkes
0215006ab7 VC1: Export profile/level
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 14:08:27 +00:00
Jason Garrett-Glaser
1eeca88691 VP8: optimize VP8Context struct ordering
Shaves at least 3KB off code size on x86, should improve cache utilization.
This would probably be useful to do for other decoders/encoders as well.
2011-03-12 03:43:42 -08:00
Jason Garrett-Glaser
3efbe13739 VP8: fix function declaration 2011-03-12 03:41:39 -08:00
Jason Garrett-Glaser
b1d2f812c9 VP8: token probs doesn't need padding
prob[0] is the only prob array ever accessed, so prob[1] can serve as padding
for prob[0].
2011-03-12 03:41:36 -08:00
Jason Garrett-Glaser
628b48db85 VP8: use a goto to break out of two loops
A break statement was supposed to break out of two loops, but only broke out of one.
Didn't affect output, just could have been marginally slower.
2011-03-12 03:41:33 -08:00
Mans Rullgard
a5444fee06 Add CONFIG_AC3DSP symbol to simplify makefiles
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 11:35:26 +00:00
Benjamin Larsson
aecd0a4496 Export profiles from the mpeg2 video decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-10 18:05:35 -05:00
Nathan Caldwell
31ff9bd7b8 aacenc: Fix a segfault in search_for_quantizers
This reverts the removal of scoefs from AACEncContext.
It resulted in scoefs being a NULL pointer when
search_for_quantizers() is called.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-08 17:45:08 -05:00
Ronald S. Bultje
4e84f994d3 reindent. 2011-03-07 13:18:57 -05:00
Young Han Lee
2790d7a9ff aacenc: remove the data arrays
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Thadeu Lima de Souza Cascardo
36864ac354 aac_latm_dec: use aac context and aac m4ac
When decoding latm config, use the corresponding aac context and its
m4ac instead of using NULL and a local variable. This fixes decoding of
audio in MPEG TS from SBTVD (the Brazillian Digital TV Sytem), when
there is no extradata. This is the case when using the decoder with
gst-ffmpeg and a GStreamer mpegts demuxer.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Justin Ruggles
2d9a101a1f ac3enc: add some assertions 2011-03-07 11:18:59 -05:00
Justin Ruggles
7100d63ca5 ac3enc: use av_assert2() instead of assert() to make debugging easier. 2011-03-07 11:18:51 -05:00
Justin Ruggles
d21be5f15b cosmetics: rename ff_fmt_convert_init_ppc() to ff_fmt_convert_init_altivec().
It only has Altivec functions and is not compiled if Altivec is disabled.
2011-03-07 11:15:29 -05:00
Carl Eugen Hoyos
159683ddec Fix compilation on powerpc with --disable-altivec. 2011-03-07 11:15:25 -05:00
Sean McGovern
02dd3666c2 h264_mp3toannexb_bsg: don't crash, but warn, if PPS/SPS not found.
Should an AVC-1 in MP4 stream not contain SPS or PPS NAL units,
this BSF is then unable to allocate an output buffer for the
modified stream. Warn that the resulting stream may be unplayable.

Fix roundup issue #2386.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:19:46 -05:00
Justin Ruggles
53e35fd340 ac3enc: add num_rematrixing_bands to AC3EncodeContext and use it instead of the hardcoded value.
Currently it is always 4, but this change will allow it to be adjusted when
bandwidth-related features are added such as channel coupling, enhanced
channel coupling, and spectral extension.
2011-03-04 17:40:24 -05:00
Justin Ruggles
b35743ffb4 ac3: define AC3_MAX_CPL_BANDS and use it in ac3dec.h 2011-03-04 16:48:09 -05:00
Ronald S. Bultje
8cf9a09d40 vp3-mt: fix deadlock when first frame is not a keyframe. 2011-03-02 12:15:07 -05:00
Mans Rullgard
ff1efc524c threads: allow thread count of zero
This moves setting the thread count to a minimum of 1 to
frame_thread_init(), allowing a value of zero to propagate
through to the codec if frame threading is not used.  This
makes auto-threads work in libx264.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-02 14:06:48 +00:00
Baptiste Coudurier
fb98507126 vc1: fix decoding when end sequence is present
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-02 13:32:58 +00:00
Baptiste Coudurier
99bbc781e9 dnxhd: allow encoding with Avid Nitris compatibility.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-01 23:55:55 +00:00
Alexander Strange
76d8846c4e huffyuv: Add multithreading support
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 11:39:25 -05:00
Alexander Strange
ad9791e12b pthreads: Fix bug introduced with thread_safe_callbacks
For intra codecs, ff_thread_finish_setup() is called before decoding starts
automatically. However, get_buffer can only be used before it's called, so
adding this requirement broke frame threading for them. Fixed by moving the
call until after get_buffer is finished.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 11:39:12 -05:00
Mans Rullgard
0b32da90f8 ARM: VP8: fix build on systems with global symbol prefix
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-27 13:53:26 +00:00
Mans Rullgard
8b454c352f ARM: fix vp8 neon with pic enabled
The assembler emits literal pools too far from the load instructions,
so we must do it explicitly at a suitable location.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-27 13:53:21 +00:00
Peter Ross
e211e255aa bink: prevent overflows within binkidct by using int-sized intermediate array
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
ccfcddb3f2 Bink version 'b' audio decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
8a8c283edd binkaudio: simplify frame_len_bits and frame_len calculation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
a304def1dc binkaudio: remove unnecessary loop
decode_init sets bands[0] == 2, so this loop always sets the band table
index (k) to zero.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
582ac86d19 binkaudio: perform band table scaling in decode_init
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Mans Rullgard
8997bb8807 bink: use LOCAL_ALIGNED for aligned stack data
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-25 19:50:14 +00:00
Kyle
04973f8082 dxva2: define required feature selection macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-25 19:48:20 +00:00
Anssi Hannula
7e06e0ede3 dca: use EXT_AUDIO_ID field to determine core extensions
This avoids the core substream extensions scan when the EXT_AUDIO_ID
field indicates no extensions or only unsupported extensions. The scan
is done only if the value of EXT_AUDIO_ID is unknown or indicates a
present XCh extension which we can decode.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-24 21:22:37 +00:00
Justin Ruggles
1108f8998c vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.
There is no need to expand to 16-bits. Just use memcpy() to copy the raw data.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:52:51 -05:00
Justin Ruggles
2ec7862db8 vmdaudio: remove unnecessary fields from VmdAudioContext and use the corresponding AVCodecContext fields instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:52:12 -05:00
Justin Ruggles
1e86d685e0 vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded sample size.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:51:44 -05:00
Justin Ruggles
1574eff3d2 vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, then making a single call to vmdaudio_loadsound().
This also adds output buffer size checks for AUDIO and SILENCE block types.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:51:12 -05:00
Justin Ruggles
ba9516cca8 cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:59 -05:00
Justin Ruggles
762b386e4a vmdaudio: move all silence chunk handling to vmdaudio_loadsound().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:58 -05:00
Justin Ruggles
8e9027d266 cosmetics: remove debugging cruft
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:56 -05:00
Justin Ruggles
868f2f4d90 cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:48:04 -05:00
Justin Ruggles
2d213695fc vmdaudio: simplify buffer pointer and header size handling.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:12:39 -05:00
Justin Ruggles
7a4fb3fd93 vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:11:36 -05:00
Justin Ruggles
22f893e1c9 vmdaudio: validate block type
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:10:12 -05:00
Justin Ruggles
dd1af5136f vmdaudio: use macros and a local variable for block type.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:08:31 -05:00
Justin Ruggles
6989cb2dae vmdaudio: correct the silent chunk count in the first block.
This fixes A/V sync with several samples, notably:
http://samples.mplayerhq.hu/game-formats/sierra-vmd/swat_*.vmd

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:06:33 -05:00
Justin Ruggles
9b73f78600 vmdaudio: output audio samples for standalone silent blocks.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:04:51 -05:00
Justin Ruggles
1328d43313 vmdaudio: remove duplicated code by merging mono and stereo decoding.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:02:19 -05:00
Justin Ruggles
a58bcb40b1 vmdaudio: fix raw_block_size calculation.
The size should depend on the output sample size, not the internal bit depth.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 20:58:56 -05:00
Young Han Lee
e22910b21a aacdec: Reduce the size of buf_mdct.
It was doubled in size for the LTP implementation. This brings it back
down to its original size.
2011-02-21 16:35:22 -08:00
Mans Rullgard
e0e46cae37 vp8: ppc: fix invalid reads in altivec epel mc
The 4-tap filters should only access one row/column before the
reference block.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-21 20:28:41 +00:00
Mans Rullgard
381efba0ec ppc: fix vc1 inverse transform, unbreak build
GCC 4.3 and later are more particular about signedness matching
in vector operations.  The operations under if(rangered) were
missing assignments and thus had no effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-21 20:28:37 +00:00
Ronald S. Bultje
78e2380a6d targa: prevent integer overflow in bufsize check. 2011-02-21 13:44:37 -05:00
Ronald S. Bultje
f8bed30d8b VC1: merge idct8x8, coeff adjustments and put_pixels.
Merging these functions allows merging some loops, which makes the
results (particularly after SIMD optimizations) much faster.
2011-02-21 10:23:44 -05:00
Ronald S. Bultje
484a337cd7 dsputil: make {add/put/put_signed}_pixels_clamped() non-static. 2011-02-21 10:23:44 -05:00
Ronald S. Bultje
bbfd2e7ab4 VC1: inline vc1_put_block() in vc1_decode_i_blocks().
Advantage is that it allows us to combine several loops into a single
one, and these can eventually be merged into the IDCT itself. Also, it
allows us to remove vc1_put_block(), and makes CODEC_FLAG_GRAY faster.
2011-02-21 10:23:44 -05:00
Mans Rullgard
1efa772e20 amrnb: use correct size when copying lsf_r array
lsf_r is an array of int16_t, not float.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-20 17:31:48 +00:00
Ronald S. Bultje
70aa916e46 VC1: don't use vc1_put_block() in vc1_decode_i_blocks_adv().
Advanced profile never uses "range reduction", so vc1_put_block() quite
literally just calls put_pixels_clamped() from vc1_decode_i_blocks_adv().
By inlining the function, we can prevent calling IDCT8x8 if
CODEC_FLAG_GRAY is set, and we don't have to scale the coeffs in the
[0,256] range, but can instead use put_signed_pixels_clamped().
2011-02-20 08:31:14 -05:00
Ronald S. Bultje
bf6fa73245 dsputil_mmx.c: remove ff_vector128.
Remove ff_vector128, it is identical to ff_pb_80.
2011-02-19 10:51:15 -05:00
Reimar Döffinger
2bbec1eda4 Fix invalid reads in VC1 decoder
Patch discussed and taken from https://roundup.ffmpeg.org/issue2584
2011-02-19 11:33:01 +01:00
David Conrad
a89f4ca005 Fix VP3 edge emulation
With negative stride, the start of the edge_emu buffer should be pointing to
the last line, not the end of the buffer.
With positive stride, pointing to the end of the buffer was completely wrong.
2011-02-19 01:42:12 -08:00
Young Han Lee
9707f84fa7 aacdec: dsputilize the scalar multiplication in intensity stereo 2011-02-19 00:57:09 -08:00
Jason Garrett-Glaser
902685b8ab VP3: fix decoding of videos with stride > 2048
Also remove qscale_table code; this didn't make sense anyways as VP3 doesn't
use an MPEG-like quantizer scale.
2011-02-18 14:40:57 -08:00
Jean-Daniel Dupas
351423ae1f targa: fix potential buffer overreads
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-18 15:04:47 +00:00
Ronald S. Bultje
ed040f35f2 Fix PPC build. 2011-02-17 20:22:39 -05:00
Jason Garrett-Glaser
891b1f15a7 VP8: init one less near_mv
This one didn't actually need to be initialized.
2011-02-17 15:25:28 -08:00
Jason Garrett-Glaser
bcf4568f18 VP8: split out declarations to new header 2011-02-17 15:25:16 -08:00
Jason Garrett-Glaser
7634771e70 VP8: faster MV clipping 2011-02-17 15:23:53 -08:00
Ronald S. Bultje
12802ec060 dsputil: move VC1-specific stuff into VC1DSPContext. 2011-02-17 17:35:35 -05:00
Ronald S. Bultje
0b16cdc3fa VC1: simplify a calculation in a loop. 2011-02-17 17:35:35 -05:00
Ronald S. Bultje
1da6ea3954 VC1: transpose IDCT 8x8 coeffs while reading. 2011-02-17 17:35:35 -05:00
Young Han Lee
979395bbbb mdct: remove unnecessary multiplication
3*n4 was already calculated in n3.
2011-02-17 11:59:28 +00:00
Justin Ruggles
5b54d4b376 ac3enc: fix bug in stereo rematrixing decision.
The rematrixing strategy reuse flags are not reset between frames, so they
need to be initialized for all blocks, not just block 0.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:57 +00:00
Michael Niedermayer
50a82c2c75 vbv_delay AVOption for ABI compatibility
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 23:05:46 +01:00
Carl Eugen Hoyos
2e3c56a29f Set maximum lowres value for the MJPEG decoder to 3.
While 4 works for some samples, 3 is the correct value since 8x8
DCT is used by (m)jpeg.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 23:05:46 +01:00
Justin Ruggles
1f004fc512 ac3dsp: Change punpckhqdq to movhlps in ac3_max_msb_abs_int16().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-16 14:08:34 -05:00
Stefano Sabatini
938b62538a Document audio_resample_close().
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 10:34:09 +01:00
Stefano Sabatini
5495528365 Apply minor cosmetics fixes to the av_audio_resample_init() doxy.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 10:33:54 +01:00
Justin Ruggles
50d7140441 ac3enc: change default floor code to 7.
This is to match the value in every (E-)AC-3 file from commercial sources.
It has a negligible effect on audio quality.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 21:40:42 +00:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Christophe Massiot
55bad0c602 Pass VBV delay to the calling application via ctx
VBV delay is useful for T-STD compliance in some TS muxers. It is
certainly possible to retrieve it by parsing the output of FFmpeg, but
getting it from the context makes it simpler and less error-prone.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 14:20:19 +00:00
Peter Ross
71f88b1f38 binkaudio: remove unused copy of AVCodecContext*
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 14:20:19 +00:00
Peter Ross
9806fbd535 binkaudio: fix channel count check
Perform validity check on AVFormatContext.channels instead of
uninitialised field.

This fixes issue 2001.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-15 14:20:19 +00:00
Young Han Lee
ead15f1dc1 aacdec: Implement LTP support.
Ported from gsoc svn.
2011-02-14 21:43:42 -08:00
Alex Converse
916dee9f45 aac: remove dead SBR input scaling
It has been unused since 9d06d7bce3

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 09:46:29 +00:00
Justin Ruggles
fbb6b49dab ac3enc: Add x86-optimized function to speed up log2_tab().
AC3DSPContext.ac3_max_msb_abs_int16() finds the maximum MSB of the absolute
value of each element in an array of int16_t.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-13 16:49:39 -05:00
Anatoly Nenashev
7a4abe5912 mpeg4video: ignore broken GOP headers
Some MPEG4 cameras produce files with empty GOP headers.
This patch makes the decoder ignore such broken headers and proceed
with the following I-frame.  Without this change, the following
start code is missed resulting in the entire I-frame being skipped.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-13 16:22:14 +00:00
Loren Merritt
e6b1ed693a FFT: factor a shuffle out of the inner loop and merge it into fft_permute.
6% faster SSE FFT on Conroe, 2.5% on Penryn.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-13 15:36:39 +01:00
Peter Ross
2315392174 bink: permute Bink version 'b' quant matrices by inverse scan order
This fixes visual glitches in Bink version 'b' files, as the quantization
tables were not being permuted.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-13 13:39:07 +00:00
Peter Ross
cb62510cab bink: simplify how quantization matrices are passed to read_dct_coeffs()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-13 12:34:01 +00:00
Vitor Sessak
47d62c965b Make tables generation insensitive to floating-point implementation
Using doubles make the double -> int cast well defined for all the values
used, with the exception of when s[i]==1.0, which is special-cased.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-12 15:47:46 +00:00
Ronald S. Bultje
2a03e87330 Add missing terminating backslash 2011-02-11 16:58:18 -05:00
Mans Rullgard
a7878c9f73 VP8: ARM optimised decode_block_coeffs_internal
Approximately 5% faster on Cortex-A8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-11 15:48:11 +00:00
Mans Rullgard
7da48fd011 ARM optimised vp56_rac_get_prob()
Approximately 3% faster on Cortex-A8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-11 15:48:10 +00:00
Peter Ross
adb1ad0d80 bink: reindent after last commit
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-11 13:47:52 +01:00
Peter Ross
e00f41d574 Bink version 'b' video decoder
Based on original patch by Kostya Shishkov

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-11 13:47:23 +01:00
Alexander Strasser
0605cb4332 vorbis dec: Remove obsolete comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 21:34:29 -05:00
Alexander Strasser
4f03c5d793 vorbis dec: cosmetics: Indent consistently
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 21:34:29 -05:00
Alexander Strasser
97f5f97108 vorbis dec: cosmetics: Indent CPP cond properly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 21:34:29 -05:00
Alexander Strasser
07f06540f6 vorbis dec: Delete useless scopes, and reindent after scope deletion
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 21:34:29 -05:00
Jason Garrett-Glaser
f3d09d44b7 VP8: optimized mv prediction and decoding
Merge find_near_mvs and mv bitstream decoding: don't do prediction steps
until absolutely necessary.
2011-02-10 16:18:16 -08:00
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
Justin Ruggles
d19b744a36 cosmetics: indentation
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-31 20:30:15 +00:00
Justin Ruggles
80ba1ddb58 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>
2011-01-31 20:28:42 +00:00
Jason Garrett-Glaser
73be29b0c4 Slightly simplify VP8 inter_predict
Merge an if and a switch.
2011-01-30 12:12:02 -08:00
Luca Barbato
dfd2a005eb Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
2011-01-29 23:55:37 +01:00
Justin Ruggles
243f8241db 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>
2011-01-29 18:58:27 +00:00
Vitor Sessak
e0eb963aaa Fix memory leak in ALS decoder in big endian systems
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-29 18:09:42 +00:00
Mans Rullgard
d461a47317 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>
2011-01-29 17:14:29 +00:00
Vitor Sessak
3af1fe829e Fix overread in altivec DSP function sad16
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-29 15:32:14 +00:00
Mans Rullgard
0745116c10 ARM: update MpegEncContext offsets 2011-01-29 04:39:39 +00:00
Ronald S. Bultje
2e27959879 Move ff_emulated_edge_mc() into DSPContext. 2011-01-28 22:13:26 -05:00
Ronald S. Bultje
e5262ec44a 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.
2011-01-28 22:13:26 -05:00
Alex Converse
e5c82df80e aacdec: Convert some loop copies into memcpy()s.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-28 17:00:36 +00:00
Stefano Sabatini
3c802cabba In the rawvideo decoder, set pkt_pts in the output frame.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 17:27:54 +01:00
Ronald S. Bultje
9d4bdcb714 Fix VP8 aliasing problems.
Replace * (uint32_t *) buf accesses with AV_WN32A/AV_COPY32.
2011-01-28 10:20:00 -05:00
Alex Converse
5ce5dbc5f3 Make ff_float_to_int16*_c() static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-28 11:35:11 +00:00
Diego Elio Pettenò
ac28ce5fac 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>
2011-01-28 01:37:21 +00:00
Justin Ruggles
b5ec638343 cosmetics: indentation and spacing 2011-01-28 00:21:46 +00:00
Justin Ruggles
9d06d7bce3 Remove the add bias hack for the C version of DSPContext.float_to_int16_*(). 2011-01-28 00:07:35 +00:00
Justin Ruggles
37cb3eb534 Add special case for 2nd-order IIR filter.
40% faster in ff_iir_filter_flt() when c->order == 2.
2011-01-28 00:04:02 +00:00
Luca Barbato
d1b6f33bf2 Add ff_ to AVHWAccel decoders
That unbreaks compilation of vaapi and dxva2

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-27 10:03:14 +01:00
Ronald S. Bultje
22893e10ae 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.
2011-01-26 15:37:11 -05:00
Diego Elio Pettenò
d36beb3f69 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>
2011-01-26 16:08:45 +00:00
Diego Elio Pettenò
2d162e3825 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>
2011-01-26 16:08:04 +00:00
Justin Ruggles
4c57cde942 Add ff_ prefix to ac3_common_init().
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 15:35:27 +00:00
Justin Ruggles
24e3ad3031 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>
2011-01-26 15:35:13 +00:00
Diego Elio Pettenò
7767d8d361 Mark C base versions of FFT functions static to fft.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 15:32:08 +00:00
Marco Gittler
b09f548285 Pass field order flag to libx264
Signed-off-by: Jason Garrett-Glaser <jason@x264.com>
2011-01-25 18:07:34 -08:00
Diego Elio Pettenò
1a88674862 Make ff_add_wav static to ra144.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:11:54 +01:00
Diego Elio Pettenò
13eb6b9097 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>
2011-01-25 22:07:29 +01:00
Diego Elio Pettenò
cf1d794a49 Make ff_ass_subtitle_header static to ass.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:05:12 +01:00
Diego Elio Pettenò
d625a32d6b Make ff_sin_tabs constant to rdft.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Diego Elio Pettenò
ebb06d96ed 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>
2011-01-25 21:48:03 +01:00
Diego Elio Pettenò
f2e246f576 Make ff_png_pass_xmin and ff_png_pass_xshift static to png.c.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Diego Elio Pettenò
676f1f533e Remove unused ff_ac3_parse_header_full function.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Diego Elio Pettenò
8529731961 Make ff_h264_decode_rbsp_trailing static to h264.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Ronald S. Bultje
44002d8323 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.
2011-01-25 13:50:16 -05:00
Mans Rullgard
21c900129c ac3: remove ff_ac3_critical_band_size_tab[] external declaration
This fixes compilation broken by 6ed3b504f9

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 15:50:51 +00:00
Diego Elio Pettenò
6ed3b504f9 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>
2011-01-25 15:10:10 +00:00
Diego Elio Pettenò
362bfe2997 Remove unused ac3_parametric_bit_allocation function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 15:09:46 +00:00
Mans Rullgard
e153e9a53a latm: remove superflous #includes
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 03:35:10 +00:00
Mans Rullgard
aa61e39eac 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>
2011-01-25 01:02:19 +00:00
Diego Elio Pettenò
5b5083b5fe 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>
2011-01-25 00:45:27 +00:00
Diego Elio 'Flameeyes' Pettenò
73a0b19ba3 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>
2011-01-25 00:25:50 +00:00
Diego Elio Pettenò
1d4da6a460 Make denoise_dct_c and dct_quantize_trellis_c static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-24 23:54:07 +00:00
Diego Elio Pettenò
bb875b75ba Make the ff_lockmgr_cb function pointer static to utils.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-24 23:45:46 +00:00
Diego Elio Pettenò
82e1f217f2 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>
2011-01-24 23:43:41 +00:00
Diego Elio Pettenò
53493f9a81 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>
2011-01-24 23:42:23 +00:00
Mans Rullgard
80944df720 x86: fix overflow in h264 8x8 planar prediction
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-24 23:24:28 +00:00
Reimar Döffinger
4be170c937 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).
(cherry picked from commit e7b95918fc)
2011-01-24 21:25:43 +01:00
Kostya
dacbcd170a reindent after last commit
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 20:46:58 +01:00
Kostya
3bdc886c22 Extend WavPack demuxer and decoder to support >2 channel audio
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 20:46:58 +01:00
Mans Rullgard
78f318be59 ARM: NEON: fix overflow in h264 16x16 planar pred
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-24 14:59:46 +00:00
Mans Rullgard
7a5a168abe MIPS: use inline asm only when supported by compiler 2011-01-23 19:05:08 +00:00
Janne Grunau
2fd9035ddc aacenc: fix typo in sync extension constant in 8ae0fa2 2011-01-23 18:57:24 +01:00
Mans Rullgard
f162e988aa 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>
2011-01-23 16:41:04 +00:00
Mans Rullgard
611a6f59ce get_bits: move tracing macros to end of file
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-23 16:40:53 +00:00
Mans Rullgard
fb5c841d5f 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>
2011-01-23 13:57:56 +00:00
Mans Rullgard
bf5f9b528b 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>
2011-01-23 13:57:56 +00:00
Mans Rullgard
938f72e199 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>
2011-01-23 13:57:56 +00:00
Justin Ruggles
3b924294ea ac3enc: use dsputil functions in apply_window()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 17:53:28 +00:00
Justin Ruggles
6eabb0d3ad Change DSPContext.vector_fmul() from dst=dst*src to dest=src0*src1.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 17:53:27 +00:00
Ronald S. Bultje
fcb7e535dd Reindent.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 18:22:03 +01:00
Ronald S. Bultje
9107892624 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>
2011-01-22 18:21:59 +01:00
Mans Rullgard
96aad41e81 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>
2011-01-22 16:18:45 +00:00
Alex Converse
ff3d43104f 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>
2011-01-22 16:15:53 +00:00
Alex Converse
8ae0fa243e aacenc: mark SBR absent
Use backwards compatible explicit signalling to denote the absence of
SBR.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 15:55:38 +01:00
Justin Ruggles
98cfadd648 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>
2011-01-22 04:46:48 +01:00
Anssi Hannula
b92f76e209 libfaac: add recognized profiles array
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 03:07:32 +01:00
Clément Bœsch
045b80e52d Move ID3v1 skip from decoder to demuxer
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 01:31:57 +01:00
Anssi Hannula
f4096bf6ee dca: add profile names
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 23:11:24 +00:00
Justin Ruggles
69915b48d6 iir: Change dst param to float* in ff_iir_filter_flt().
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 22:23:43 +00:00
Anssi Hannula
8f4a5d225c 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>
2011-01-21 22:20:20 +00:00
Justin Ruggles
1c189fc533 cosmetics related to LPC changes.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 19:59:08 +00:00
Justin Ruggles
77a78e9bdc Separate window function from autocorrelation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 19:59:08 +00:00
Justin Ruggles
56f8952b25 Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 19:58:59 +00:00
Mans Rullgard
2611e52088 dca: pretty-print some tables
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 10:37:21 +00:00
Justin Ruggles
0361d13cf3 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>
2011-01-20 23:55:21 +00:00
Justin Ruggles
fcdf0a43cd Add biquad high-pass and low-pass IIR filters.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 23:51:01 +00:00
Ronald S. Bultje
66c6b5e2a5 Revert 2a1f431d38, it broke H264 lossless. 2011-01-20 17:24:44 -05:00
Ronald S. Bultje
8bcfe7f7fd Set gray (128) U/V planes for chroma-less samples. Fixes two fate samples
when played with -flags emu_edge.
2011-01-20 17:24:44 -05:00
Justin Ruggles
30112adadf Split out Butterworth filter coeff init to a separate function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 20:23:28 +00:00
Justin Ruggles
75b98610a7 cosmetics: vertical alignment and line wrap
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 18:35:42 +00:00
Justin Ruggles
d42dc217ed Add memory allocation failure checks to ff_iir_filter_init_coeffs().
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 18:35:13 +00:00
Justin Ruggles
ebb230279a cosmetics: wrap long line
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 17:27:00 +00:00
Justin Ruggles
0a3d7697b4 Add function ff_iir_filter_flt() to accept floating-point input and output.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 17:26:13 +00:00
Ronald S. Bultje
b9c7f66e6d 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>
2011-01-19 20:34:42 -05:00
Justin Ruggles
c3897d7690 Fix use of sstep/dstep in ff_iir_filter().
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-19 20:56:07 +00: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
Ronald S. Bultje
1b3e43e4fd Fix overflow in pred16x16_plane x86 simd code. Fixes issue 2547.
Originally committed as revision 26381 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 22:00:44 +00:00
Jason Garrett-Glaser
b9af15402d Remove evil timers that snuck their way into r26375.
Originally committed as revision 26377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 18:14:36 +00:00
Jason Garrett-Glaser
fb2734c8a6 Fix r26375 on non-x86.
Originally committed as revision 26376 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 18:13:40 +00:00
Jason Garrett-Glaser
f14bdd8e75 H.264: Partially inline CABAC residual decoding
Improves CABAC performance about ~1.2%.

Trick originates from x264 and has also been used in ffvp8.  It's useful because
coded block flags are usually zero, so it helps to have the early termination
inlined into the main function.

Originally committed as revision 26375 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:52:48 +00:00
Frank Barchard
925aa96915 Second hunk from secrity fix from google.
The hunk is not fully understood but it just makes a check tighter so its
safer for us to apply until it is fully understood.

Might fix issue 2550 (and Chrome issue 68115 and unknown CERT issues).
Our bugtracker issue though should stay open until this has been fully
investiagted

Patch by Frank Barchard, fbarchard at google

Originally committed as revision 26368 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:10:49 +00:00
Sascha Sommer
f734671925 do not read over the end of the packet
fixes issue 2543

Originally committed as revision 26367 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 16:39:52 +00:00
Frank Barchard
13184036a6 Check rangebits to avoid a possible crash.
Fixes issue 2548 (and Chrome issue 68115 and unknown CERT issues).

Patch by Frank Barchard, fbarchard at google

Originally committed as revision 26365 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 16:19:06 +00:00
Kostya Shishkov
03ec42aa1c Change some band size calculations in Bink decoder to use width in blocks
instead of real width, this fixes decoding of some Bink files with odd width.

Originally committed as revision 26364 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 13:29:14 +00:00
Reimar Döffinger
b0c8b8a69d Lagarith: fix decoding of one-coloured frames by reading the per-plane
color value instead of always taking 0 (resulting in green frames).
Fixes issue issue2531.

Originally committed as revision 26363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 12:44:48 +00:00
Daniel Kang
eb40d7ffa7 Check symbol validity to avoid a crash, fixes issue 2523.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26360 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 10:18:38 +00:00
Justin Ruggles
0db5d2b09e cosmetics: spacing, line wrap, and remove unneeded braces
Originally committed as revision 26359 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:59:31 +00:00
Justin Ruggles
964f2cf2a0 Process all EXP_REUSE blocks at once in exponent_min().
43% faster in function encode_exponents().

Originally committed as revision 26358 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:59:21 +00:00
Justin Ruggles
7d87d56ff8 Take advantage of per-channel exponent and exponent strategy layout to
simplify and speed up encode_exponents().
8% faster in function.

Originally committed as revision 26357 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:59:15 +00:00
Justin Ruggles
5bff8590f3 Simplify compute_exp_strategy() by passing a pointer to all exponents and
exponent strategies for a single channel to compute_exp_strategy_ch().
This allows for removal of the temporary pointer arrays.

Originally committed as revision 26356 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:59:10 +00:00
Justin Ruggles
4b90c35d74 Use a local variable in the inner loop of group_exponents() to simplify the
code.

Originally committed as revision 26355 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:59:04 +00:00
Justin Ruggles
a281c6509f cosmetics: remove unneeded braces
Originally committed as revision 26354 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:58:59 +00:00
Justin Ruggles
5fc2e0075d cosmetics: rename block_num to blk for variable name consistency
Originally committed as revision 26353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:58:55 +00:00
Justin Ruggles
0429e4a6ca Move exp_strategy from AC3Block to AC3EncodeContext in order to arrange by
channel first, then by block.

Originally committed as revision 26352 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:58:50 +00:00
Justin Ruggles
7cc4be58b4 Rearrange exponent buffer to group all blocks for a single channel together.
This will allow for faster and simpler processing of all blocks at once.

Originally committed as revision 26351 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:58:45 +00:00
Jason Garrett-Glaser
2a1f431d38 H.264/SVQ3: make chroma DC work the same way as luma DC
No speed improvement, but necessary for some future stuff.
Also opens up the possibility of asm chroma dc idct/dequant.

Originally committed as revision 26349 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:10:46 +00:00
Jason Garrett-Glaser
290fabc684 Port SVQ3 to use the new mb_luma_dc method of storing luma DC coefficients.
Doesn't help speed as there isn't an asm implementation yet, but consistency
is a good thing.

Originally committed as revision 26348 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 00:41:18 +00:00
Sascha Sommer
3cdf69eefa also support decoding of AVPackets with multiple wma packets
fixes issue 2539

Originally committed as revision 26346 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 23:58:55 +00:00
Jason Garrett-Glaser
65344775b8 H.264: Remove useless arg to chroma_dc_dequant_idct_c
Originally committed as revision 26345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 23:46:55 +00:00
Ronald S. Bultje
ec3233a855 Fix ff_pw_3 alignment.
Originally committed as revision 26344 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 23:26:34 +00:00
Jason Garrett-Glaser
2e18660115 Fix SVQ3
Regression in r26336-7.

Originally committed as revision 26341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 22:23:42 +00:00
Jason Garrett-Glaser
bd11c7a1a8 Remove outdated comment in h264dsp.h
Since we no longer have non-transposed scantables, the problem it warns about
no longer exists.

Originally committed as revision 26339 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:48:33 +00:00
Jason Garrett-Glaser
0d1d01cf70 Reindent after r26337.
Originally committed as revision 26338 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:36:45 +00:00
Jason Garrett-Glaser
5657d14094 H.264: switch to x264-style tracking of luma/chroma DC NNZ
Useful so that we don't have to run the hierarchical DC iDCT if there aren't
any coefficients.  Opens up some future opportunities for optimization as well.

Originally committed as revision 26337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:36:16 +00:00
Jason Garrett-Glaser
19fb234e4a H.264: split luma dc idct out and implement MMX/SSE2 versions
About 2.5x the speed.

NOTE: the way that the asm code handles large qmuls is a bit suboptimal.
If x264-style dequant was used (separate shift and qmul values), it might
be possible to get some extra speed.

Originally committed as revision 26336 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:34:25 +00:00
Jason Garrett-Glaser
ca32f7f208 H.264: eliminate non-transposed scantable support.
It was an ugly hack to begin with and didn't give any performance.

NOTE: this patch opens up some future simplifications to be made (such as
removing some of the scantables from H264Context) but doesn't take advantage
of them yet.

Originally committed as revision 26329 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:04:59 +00:00
Sascha Sommer
75e4efd2a7 add support for blocksize 64
fixes issue 2537 and 2538

Originally committed as revision 26328 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 16:36:57 +00:00
Aurelien Jacobs
e83c716e16 don't complain about codec type/id mismatche for attachment streams
Originally committed as revision 26316 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-12 00:33:22 +00:00
Daniel Kang
e048a9cab1 Do not crash for illegal sample size, fixes issue 2502.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26309 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 14:08:45 +00:00
Jason Garrett-Glaser
09fffe9bd4 H.264: fix grayscale decoding with explicit wpred
Originally committed as revision 26306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 23:42:45 +00:00
Carl Eugen Hoyos
8219782a6d Do not stop decoding on pnm files with negative maxval.
Originally committed as revision 26304 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 22:09:52 +00:00
Clément Bœsch
c56e71309e In gif encoder, fix uninitialized value, patch by Clément Bœsch, ubitux at gmail dot com
Originally committed as revision 26303 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 21:14:54 +00:00
Daniel Kang
94e58e5770 perform height sanity check in mmvideo decoder
Fixes issue2495
Original patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26300 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 12:23:03 +00:00
Peter Ross
091bc6ca8c mmvideo: remove some conditional statements by limiting range of half_horiz and half_vert parameters to [0,1]
Originally committed as revision 26299 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 12:16:33 +00:00
Clément Bœsch
c19a216af3 Handle ID3v1 tag while decoding mp[123] frames
patch by Clément Bœsch (ubitux at gmail)

Originally committed as revision 26297 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 11:36:11 +00:00
Daniel Kang
2843502ea4 Check for invalid decode op-codes, fixes issue 2522.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26295 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 10:47:10 +00:00
Daniel Kang
8e37a1deb3 Check for vectable ID > 0, fixes issue 2508.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26294 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 10:36:14 +00:00
Daniel Kang
43c34675af Check for invalid motion vector, fixes issue 2521.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 10:28:06 +00:00
Daniel Kang
ebc3488300 Check for invalid maxval in pgm decoder, fixes issue 2518.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26292 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 00:42:57 +00:00
Anssi Hannula
39f4d32908 Fix reading over the end of the allocated buffer.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26291 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 23:01:01 +00:00
Daniel Kang
b89f4fb190 Check for several overreads, fixes issue 2512.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 19:38:32 +00:00
Daniel Kang
a4db272a92 Return on negative soff sizes, fixes issue 2515.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26288 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 19:29:39 +00:00
Martin Storsjö
31561a98ae Fix arm asm offsets for arm/mach-o
Originally committed as revision 26287 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 15:23:00 +00:00
Luca Barbato
183cdf7163 Update asm offsets for arm
This unbreak ffmpeg build on arm/elf, arm/mach-o still need an update

Originally committed as revision 26286 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 14:21:35 +00:00
Peter Ross
cd426563f4 fix indentation
Originally committed as revision 26280 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 08:30:23 +00:00
Daniel Kang
062421e30d eacmv: ensure second-last frame is allocated before referencing it
Fixes issue2513
Original patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26279 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 08:28:40 +00:00
Justin Ruggles
14207fd23e Remove unneeded #include
Originally committed as revision 26272 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:04:30 +00:00
Justin Ruggles
dc7e07ac1f Add stereo rematrixing support to the AC-3 encoders.
This improves the audio quality significantly for stereo source with both the
fixed-point and floating-point AC-3 encoders.
Update acodec-ac3_fixed and seek-ac3_rm test references.

Originally committed as revision 26271 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 23:21:17 +00:00
Carl Eugen Hoyos
d267b339e4 Lagarith decoder by Nathan Caldwell, saintdev at gmail
Originally committed as revision 26270 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 21:22:15 +00:00
Kostya Shishkov
c392cc0a64 Limit number of samples decoded for WavPack mono mode, so decoded samples will
fit into output buffer.

Originally committed as revision 26269 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 19:23:24 +00:00
Sascha Sommer
15a8bef0b6 skip unsupported postproc information
Originally committed as revision 26268 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 15:49:29 +00:00
Sascha Sommer
b86dd1bf6d add support for files that do not allow more than 4 subframes
Originally committed as revision 26267 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 15:38:14 +00:00
Sascha Sommer
d7fa58c049 fix indentation
Originally committed as revision 26266 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 15:35:56 +00:00
Sascha Sommer
8b5a780e73 add support for files where the frames do not have a length prefix
Originally committed as revision 26265 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 15:32:31 +00:00
Anssi Hannula
2a81f4bde5 Show profile in avcodec_string().
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26264 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 09:23:25 +00:00
Baptiste Coudurier
82dadb90a7 Fix bmp encoder with 8 bits format and correctly set bits_per_coded_sample
Originally committed as revision 26263 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 23:56:47 +00:00
Michael Niedermayer
81c623fae0 Deprecate reordered_opaque in favor of pkt_pts/dts
Originally committed as revision 26262 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 23:07:31 +00:00
Michael Niedermayer
1919feafb1 Add pkt_dts to AVFrame, this will in the future allow multithreading decoders
to not mess up dts

Originally committed as revision 26261 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 23:07:28 +00:00
Michael Niedermayer
393cbb963b Add AVFrame.pkt_pts that contains the correctly reordered AVPacket.pts
Originally committed as revision 26260 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 23:07:24 +00:00
Anssi Hannula
060ec0a829 Add av_get_profile_name() to get profile names.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26259 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 22:27:26 +00:00
Daniel Kang
f2953365d1 Check if buffer is large enough for given resolution.
Fixes issue 2501.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26258 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 21:54:52 +00:00
Daniel Kang
fea714ecd9 Do not overread input buffer.
Fixes issue 2503.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26256 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 19:55:22 +00:00
Carl Eugen Hoyos
b82579a6ec Fail more gracefully for multichannel wavpack in another container.
Originally committed as revision 26253 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 13:24:58 +00:00
Daniel Kang
65cd45a88c Prevent a crash by sanity checking buffer reads.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26251 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 23:14:27 +00:00
Anssi Hannula
f5a2d285f9 Export dca profile information.
Patch by Anssi Hannula anssi d hannula a iki d fi

Originally committed as revision 26250 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 22:34:12 +00:00
Anssi Hannula
df1c694c58 Verify FSIZE96 when encountering X96 sync code.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26249 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 22:24:39 +00:00
Daniel Kang
d381249bb8 Fix a crash when decoding tiff by moving check
for invalid header up before reading data.
Fixes issue 2500.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26248 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 22:12:55 +00:00
Baptiste Coudurier
35ca5c0b6b In dnxhd decoder, set key_frame on decoded frame
Originally committed as revision 26247 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 20:17:51 +00:00
Daniel Kang
1ba44140a3 Fix crash for files with strip size larger than the buffer.
Fixes issue 2498.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 14:44:50 +00:00
Justin Ruggles
ac05f9030e Convert floating-point MDCT coefficients to 24-bit fixed-point all at once
instead of doing it separately in 2 different functions.
This makes float AC-3 encoding approx. 3-7% faster overall.
Also, the coefficient conversion can now be easily SIMD-optimized.

Originally committed as revision 26232 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 20:35:36 +00:00
Vitor Sessak
6e16398aa3 Make dc_lum_vlc and dc_chroma_vlc non-static symbols,
this fixed the decoding of version 3 PSX MDEC files.

Originally committed as revision 26230 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 19:38:42 +00:00
Justin Ruggles
9be52d48d9 Use local variables outside the inner loop in extract_exponents() to reduce
accessing of structs and arrays inside the loop.
Approx. 30% faster in function extract_exponents().

Originally committed as revision 26226 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 16:02:08 +00:00
Stefano Sabatini
2d777bb7a2 Make mpeg4 encoder log a more explicit error message when the timebase
is not valid.

Originally committed as revision 26223 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 11:36:43 +00:00
Michael Niedermayer
db61329607 Our ljpeg encoder supports bgra, use the correct constant in the sanity check.
Originally committed as revision 26220 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 04:52:35 +00:00
Michael Niedermayer
dc8465a9b4 Remove PIX_FMT_RGB32 mjpeg encoding, there is no such thing ...
Originally committed as revision 26218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 04:52:21 +00:00
Michael Niedermayer
e27bf2c70c Fix YUV444P LJPEG encoding.
Originally committed as revision 26215 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-04 18:57:16 +00:00
Justin Ruggles
f1cbbb79bf cosmetics: fix typo in previous commit
Originally committed as revision 26210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-04 12:08:10 +00:00
Justin Ruggles
6fd96d1a85 Change the AC-3 encoder to use floating-point.
Fixed-point AC-3 encoder renamed to ac3_fixed.
Regression test acodec-ac3 renamed to acodec-ac3_fixed.
Regression test lavf-rm changed to use ac3_fixed encoder.

Originally committed as revision 26209 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-04 11:53:44 +00:00
Aurelien Jacobs
4f18f1b089 mpeg4videodec: reset time_base.num to 0 when detecting time_base.den=0
to avoid leaving time_base in a broken/inconsistent state
fix issue2471

Originally committed as revision 26207 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-03 23:33:20 +00:00
Justin Ruggles
ad6b2c1f6d Move fixed-point parts of the AC-3 encoder to separate files.
Originally committed as revision 26206 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-03 16:08:56 +00:00
Daniel Kang
004357a11f Fix compilation on x86-32 with --disable-optimizations,
fixes issue 2127.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26204 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-03 11:30:04 +00:00
Daniel Kang
3b99e00c75 Fix crash decoding broken wmv2 files.
Fixes issue 1670.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26202 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 23:41:02 +00:00
Aurelien Jacobs
f5dd1eb7b5 srtdec: ensure we don't read 1 byte after buffer end if the buffer is not
properly terminated.

Originally committed as revision 26201 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 23:40:30 +00:00
Vitor Sessak
e3e3c82555 Make PSX MDEC decoder output YUVJ420 and always use IDCT_SIMPLE. This
makes the output much closer to original Playstation hardware.

Originally committed as revision 26196 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 11:16:21 +00:00
Reimar Döffinger
0a3028b9b0 Use AVSampleFormat instead of the deprecated SampleFormat.
Originally committed as revision 26185 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-01 19:45:08 +00:00
Stefano Sabatini
421167b03b Fix typos.
Originally committed as revision 26183 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-01 11:47:51 +00:00
Justin Ruggles
9c84a72a25 Skip the bit allocation search if previous and current SNR offsets are the
maximum value of 1023.
This speeds up overall encoding depending on the content and bitrate.
The most improvement is with high bitrates and/or low complexity content.

Originally committed as revision 26181 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 23:22:08 +00:00
Justin Ruggles
5128842ea2 10l: Fix mistake in r26044. Check increment bounds using actual increment
instead of 64. This will change output in some cases, but it happens to not
affect the AC-3 regression tests.

Originally committed as revision 26180 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 22:59:19 +00:00
Justin Ruggles
c05ffcd9ba Change planar_samples from int16_t to SampleType.
This one was missed in r26174.

Originally committed as revision 26179 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 20:01:12 +00:00
Jason Garrett-Glaser
32282b50ea Add .pix_fmts to LCL encoder
Now ffmpeg should automatically convert to BGR instead of erroring out.

Originally committed as revision 26178 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 04:56:44 +00:00
Daniel Kang
0790caba60 Fix invalid reads in valgrind fate, patch by Daniel Kang <daniel dot d dot
kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26177 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 01:29:06 +00:00
Aurelien Jacobs
f19c58b4cf free subtitle_header before overwriting it to avoid memleak
Originally committed as revision 26176 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-31 00:06:25 +00:00
Justin Ruggles
0cbd5ff704 Add typedefs and a macro that will allow sharing of functions between the
fixed-point and floating-point AC-3 encoders.

Originally committed as revision 26174 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 22:30:48 +00:00
Justin Ruggles
b33dae5efb Move the list of supported channel layouts to a separate table.
Originally committed as revision 26173 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 22:13:41 +00:00
Justin Ruggles
34d5074e6d Add a window field to AC3MDCTContext and use it as an input to apply_window()
instead of using the ff_ac3_window[] table directly.

Originally committed as revision 26172 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 22:13:37 +00:00
Justin Ruggles
b5293036b9 cosmetics: alignment, line wrap, and spacing
Originally committed as revision 26171 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 22:13:34 +00:00
Justin Ruggles
14166a6d6c Remove avctx from AC3MDCTContext and just pass it to mdct_init() instead.
Originally committed as revision 26170 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 22:13:30 +00:00
Justin Ruggles
e0698e4bbd Make exponent_group_tab[] static.
Originally committed as revision 26169 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 22:13:25 +00:00
Ronald S. Bultje
7148da489e Fix valgrind invalid read on top MB rows with CODEC_FLAG_EMU_EDGE set.
Originally committed as revision 26168 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 14:33:21 +00:00
Justin Ruggles
b3f5c21a91 Use %td instead of %PRIdPTR. The argument has type ptrdiff_t.
Originally committed as revision 26166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 13:34:31 +00:00
Justin Ruggles
78c8b4b758 Add audio flag to libvorbis AVOption.
Originally committed as revision 26165 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 04:22:41 +00:00
Justin Ruggles
281bf84fbd Use %"PRIdPTR" instead of %d to silence gcc warning about type mismatch.
Originally committed as revision 26164 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 04:09:44 +00:00
Michael Chinen
4b5d4720c1 flac_parser: loop append buffer when the default size is not enough to get
the desired number of frames.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 26163 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 04:09:39 +00:00
Daniel Kang
536e9b2f58 Port pred8x8l_down_left_mmxext (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang
at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26162 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 23:48:44 +00:00
Daniel Kang
720ea2d5b2 Port pred4x4_down_right_mmxext (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang
at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26159 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:55:51 +00:00
Daniel Kang
d0aebe23e2 Port pred4x4_vertical_right_mmxext (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang
at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26158 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:52:41 +00:00
Daniel Kang
76497232ef Port pred4x4_horizontal_down_mmxext (H.264 intra prediction) from x264
(authors:Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26157 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:49:57 +00:00
Daniel Kang
e9c576a467 Port pred4x4_horizontal_up_mmxext (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang
at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:42:33 +00:00
Daniel Kang
92f441ae86 Port pred4x4_vertical_left_mmxext (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang
at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26155 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:35:34 +00:00
Ronald S. Bultje
e8d98764cc Merge a few superfluous CONFIG_GPL checks.
Originally committed as revision 26154 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:30:47 +00:00
Ronald S. Bultje
916393da24 Whitespace cosmetics.
Originally committed as revision 26153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 21:23:31 +00:00
Ronald S. Bultje
42a59278cf Whitespace cosmetics.
Originally committed as revision 26152 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 20:43:15 +00:00
Daniel Kang
57b1f334d1 Port pred8x8l_horizontal_down_sse2/ssse3 (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26151 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 20:42:15 +00:00
Daniel Kang
04cbdf3d24 Port pred8x8l_horizontal_down_mmxext (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26150 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 20:38:06 +00:00
Daniel Kang
98c6053cd0 Port pred8x8l_horizontal_up_mmxext/ssse3 (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26149 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 20:35:31 +00:00
Daniel Kang
ecc7efbbb6 Port pred8x8l_vertical_left_sse2/ssse3 (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26148 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 20:06:22 +00:00
Daniel Kang
bdd93f1b25 Port pred8x8l_vertical_right_sse2/ssse3 (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26147 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 19:54:05 +00:00
Daniel Kang
f25112fc09 Port pred8x8l_vertical_right_mmxext (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26146 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 19:46:09 +00:00
Daniel Kang
602a4cb25a Port pred8x8l_down_right_sse2/ssse3 (H.264 intra prediction) from x264
(authors: Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot
d dot kang at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26145 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 19:19:49 +00:00
Justin Ruggles
ec44dd5fc2 Change the default dB-per-bit code from 2 to 3.
This gives slightly better quality in PEAQ tests.
Code 3 gives a dBpb value of 2816 = -132dB (128 psd units = -6dB), which
corresponds to 22 bits. Since the exponents have an offset applied, the
16-bit source looks like 24-bit source to the bit allocation routine.
So using dBpb code=3 is a closer match to the exponent range.

Regression test refs updated for acodec-ac3, lavf-rm, and seek-ac3_rm.

Originally committed as revision 26144 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 19:17:22 +00:00
Daniel Kang
e916acbcd1 Port pred8x8l_down_right_mmxext (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang
at gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26143 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 19:12:02 +00:00
Daniel Kang
c249e66576 Port pred8x8l_down_left_sse2/ssse3 (H.264 intra prediction) from x264 (authors:
Jason, Loren, Holger) to FFmpeg. Patch by Daniel Kang <daniel dot d dot kang at
gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26142 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 19:02:50 +00:00
Daniel Kang
ee1ba9c326 Port pred8x8l_vertical_mmxext/ssse3 (H.264 intra prediction) from x264 to
FFmpeg. Original authors: Holger Lubitz <holger lubitz org>, Jason Garrett-
Glaser <darkshikari gmail com> (approves LGPL relicensing for this code) and
Loren Merritt <lorenm at u dot washington dot edu> (approves LGPL relicensing
for this code). Patch by Daniel Kang <daniel dot d dot kang at gmail com>, as
part of Google's GCI 2010.

Originally committed as revision 26140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:46:40 +00:00
Daniel Kang
04207ef353 Port pred8x8l_horizontal_mmxext/ssse3 (H.264 intra prediction) from x264 to
FFmpeg. Original authors: Holger Lubitz <holger lubitz org>, Jason Garrett-
Glaser <darkshikari gmail com> (approves LGPL relicensing for this code) and
Loren Merritt <lorenm at u dot washington dot edu> (approves LGPL relicensing
for this code). Patch by Daniel Kang <daniel dot d dot kang at gmail com>, as
part of Google's GCI 2010.

Originally committed as revision 26139 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:40:53 +00:00
Daniel Kang
abab14eac0 Port pred8x8l_dc_mmx/ssse3 (H.264 intra prediction) from x264 to FFmpeg.
Original authors: Holger Lubitz <holger lubitz org>, Jason Garrett-Glaser
<darkshikari gmail com> (approves LGPL relicensing for this code) and Loren
Merritt <lorenm at u dot washington dot edu> (approves LGPL relicensing for
this code). Patch by Daniel Kang <daniel dot d dot kang at gmail com>, as
part of Google's GCI 2010.

Originally committed as revision 26138 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:33:10 +00:00
Daniel Kang
2e93fd4b5e Port pred8x8l_top_dc_mmxext/ssse3 (H.264 intra prediction) from x264 to FFmpeg.
Original authors: Holger Lubitz <holger lubitz org>, Jason Garrett-Glaser
<darkshikari gmail com> (approves LGPL relicensing for this code) and Loren
Merritt <lorenm at u dot washington dot edu> (approves LGPL relicensing for
this code). Patch by Daniel Kang <daniel dot d dot kang at gmail com>, as
part of Google's GCI 2010.

Originally committed as revision 26137 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:11:27 +00:00
Ronald S. Bultje
54a959e483 Move PRED4x4_LOWPASS up so it can be used in 8x8l predict functions while
keeping the functions ordered in the source file (i.e. cosmetics).

Originally committed as revision 26136 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:04:57 +00:00
Ronald S. Bultje
a2dfe8d18d Port pred8x8_dc_mmxext (H.264 intra prediction) from x264 to FFmpeg. Original
authors: Holger Lubitz <holger lubitz org>, Jason Garrett-Glaser <darkshikari
gmail com> (approves LGPL relicensing for this code) and Loren Merritt <lorenm
at u dot washington dot edu> (approves LGPL relicensing for this code). Patch
by Daniel Kang <daniel dot d dot kang at gmail com>, as part of Google's GCI
2010.

Originally committed as revision 26135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:00:26 +00:00
Ronald S. Bultje
83ff3f72e5 Add missing authors to copyright headers.
Originally committed as revision 26133 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 17:45:26 +00:00
Daniel Kang
725a3f9dfb Port pred8x8_top_dc_mmxext (H.264 intra prediction) from x264 to FFmpeg.
Original authors: Holger Lubitz <holger lubitz org>, Jason Garrett-Glaser
<darkshikari gmail com> (approves LGPL relicensing for this code) and Loren
Merritt <lorenm at u dot washington dot edu> (approves LGPL relicensing for
this code). Patch by Daniel Kang <daniel dot d dot kang at gmail com>, as
part of Google's GCI 2010.

Originally committed as revision 26132 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 17:42:34 +00:00
Ronald S. Bultje
98928c83e0 Mark recently added pred4x4_down_left_mmxext as CONFIG_GPL. Although Holger
initially said he'd be OK with relicensing, he also said he wanted to have
another look at the patch, and then he went on vacation, so let's play it
safe for now. We can consider removing this again later.

Originally committed as revision 26131 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 17:34:00 +00:00
Aurelien Jacobs
2c77c90684 add SubRip decoder
Originally committed as revision 26119 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 23:52:53 +00:00
Ronald S. Bultje
312056c54e Bump micro for VP8 emu-edge support.
Originally committed as revision 26118 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 22:48:39 +00:00
Ronald S. Bultje
ee555de7dd Support CODEC_FLAG_EMU_EDGE in VP8 decoder.
Originally committed as revision 26117 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 17:37:19 +00:00
Anton Khirnov
fd5b124d74 Metadata demuxer.
Originally committed as revision 26102 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:53 +00:00
Ronald S. Bultje
18f1add31c Fix typo.
Originally committed as revision 26099 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 22:48:13 +00:00
Michael Niedermayer
52654005ca Simplify tff setting code in MPV_frame_start().
Originally committed as revision 26090 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-25 19:49:19 +00:00
Daniel Verkamp
13011def1f Fix size of monoblack_pal array, code uses 16 values unconditionally.
Patch by Daniel Verkamp [daniel drv nu].

Originally committed as revision 26088 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-25 16:09:23 +00:00
Daniel Kang
911b32f482 Port pred4x4_down_left_mmxext (H.264 intra prediction) from x264 to FFmpeg.
LGPL relicensing approved by original authors: Holger Lubitz <holger lubitz
org>, Jason Garrett-Glaser <darkshikari gmail com> and Loren Merritt <lorenm
at u dot washington dot edu>. Patch by Daniel Kang <daniel dot d dot kang at
gmail com>, as part of Google's GCI 2010.

Originally committed as revision 26087 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-24 22:43:07 +00:00
Ronald S. Bultje
8d147f1f60 For rounding in chroma MC SSSE3, use 16-byte pw_3/4 instead of reading 8 bytes
and then using movlhps to dup it into the higher half of the register.

Originally committed as revision 26086 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-24 17:23:22 +00:00
Justin Ruggles
b51c740eab cosmetics: line wrap and vertical alignment
Originally committed as revision 26084 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-23 18:01:29 +00:00
Justin Ruggles
e96dc767e4 Make sure that the 2nd CRC value does not match the AC-3 sync word.
This is optional for encoders, but it's a good idea and has minimal impact
on performance.
This will change the output for some files, but it happens not to affect the
regression tests.

Originally committed as revision 26083 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-23 18:01:26 +00:00
Justin Ruggles
a897423baa Store CRC context locally to reduce number of calls to av_crc_get_table().
Originally committed as revision 26082 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-23 18:01:23 +00:00
Justin Ruggles
0e9b064305 Remove unneeded local variable, frame_size, in output_frame_end().
Originally committed as revision 26081 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-23 18:01:19 +00:00
Martin Storsjö
81c8c18780 Makefile: Fix dependencies of components
This fixes compilation with --disable-everything --enable-<component>,
for all encoders, decoders, muxers, demuxers, parsers, protocols, bsfs,
indevs, outdevs and filters at the moment. (All those that work without
any external dependencies at least.)

Originally committed as revision 26076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-22 20:00:42 +00:00
Justin Ruggles
1ce9d6b85f cosmetics: fix comment after change in clipping range
Originally committed as revision 26072 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-22 12:28:02 +00:00
Justin Ruggles
295ab2af6e Change FIX15() back to clipping to -32767..32767.
This avoids a 16-bit overflow in mdct512() due to a -32768 value in costab.
References updated for acodec-ac3, lavf-rm, and seek-ac3_rm tests.
Thanks to Måns Rullgård for finding the bug.

Originally committed as revision 26071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 21:18:58 +00:00
Justin Ruggles
f9f69028af Add emms_c() after exp_diff calculations.
Fixes AC-3 encoding on OpenBSD 4.8 x86_32 and hopefully other similar
configurations.

Originally committed as revision 26070 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 20:56:25 +00:00
Justin Ruggles
a81d7c6aa3 Pre-calculate crc_inv at codec init.
20% faster output_frame_end().

Originally committed as revision 26069 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 18:26:13 +00:00
Martin Storsjö
fe7438d97f Fix make checkheaders
amrwbdata.h uses offsetof(), which is defined in stddef.h.

Originally committed as revision 26068 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 11:19:59 +00:00
Martin Storsjö
223cefb560 Fix more matroska/webm muxer dependencies
This fixes building with --disable-everything --enable-muxer=matroska and/or
--enable-muxer=webm

Originally committed as revision 26067 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 09:28:39 +00:00
Martin Storsjö
8bd1956462 g722: Move the low_inv_quant6 table up to the common tables
Since SVN rev 25866, this table is used by the trellis encoder, too,
not only by the decoder.

Originally committed as revision 26065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 09:03:57 +00:00
Anatoly Nenashev
ba68d9d3e1 Fix -lowres with ffplay.
Patch by Anatoly Nenashev, anatoly d nenashev a ovsoft d ru

Originally committed as revision 26057 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-19 12:17:40 +00:00
Ramiro Polla
d09b5a869f bump lavcodec minor version for amr-wb decoder in r26051
Originally committed as revision 26052 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 05:15:32 +00:00
Ronald S. Bultje
2b2a597ec0 AMR-WB decoder, written as part of Google Summer of Code 2010 by Marcelo
Galvão Póvoa <marspeoplester gmail com>, mentored by Robert Swain <robert
dot swain gmail com>.

Originally committed as revision 26051 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 03:03:18 +00:00
Justin Ruggles
386268dfff Add some simple fallbacks for normal bit allocation failure.
This allows encoding with lower bitrates by decreasing exponent bits first,
then decreasing bandwidth if the user did not specify a specific cutoff
frequency.

Originally committed as revision 26050 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 23:42:56 +00:00
Justin Ruggles
e62ef8f2db Check user-specified cutoff frequency in validate_options().
Originally committed as revision 26049 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 23:42:52 +00:00
Justin Ruggles
78646ac206 10l: fix encoding for LFE channel
Originally committed as revision 26048 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 22:06:00 +00:00
Justin Ruggles
86c9673bab Add support for fixed-point MDCT sizes other than 512.
Originally committed as revision 26046 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 20:52:27 +00:00
Justin Ruggles
234b70d346 cosmetics: reindent after last commit
Originally committed as revision 26045 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 15:02:15 +00:00
Justin Ruggles
98e34e71c0 Simplify bit allocation search by using a loop for the SNR offset increment.
Originally committed as revision 26044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 15:02:12 +00:00
Justin Ruggles
cf7c961b19 Do not calculate psd and masking curve if exponents are being reused.
Approx. 20% faster in function bit_alloc_masking().

Originally committed as revision 26042 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 14:16:13 +00:00
Justin Ruggles
68e6b0990d cosmetics: reindent after last commit
Originally committed as revision 26041 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:11 +00:00
Justin Ruggles
795063db3b Copy bap from previous block when exponent strategy is EXP_REUSE.
We can do this because exponents are the only bit allocation parameters which
change from block-to-block currently.
Approx. 57% faster in function bit_alloc().
Approx. 25% faster overall encoding.

Originally committed as revision 26040 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:07 +00:00
Justin Ruggles
126a29b871 Count grouped mantissas for each block all at once at the end of bit
allocation for each block.
24% faster in function bit_alloc(). Approx. 10% faster overall encoding.

Originally committed as revision 26039 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:04 +00:00
Justin Ruggles
e7536ac567 Count bits for fixed parameters at start of encoding rather than in every
frame.

Originally committed as revision 26038 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:00 +00:00
Justin Ruggles
e86ea34dad Use a LUT for number of exponent groups. This avoids recalculating it for
every block and channel for every frame.

Originally committed as revision 26037 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:22 +00:00
Justin Ruggles
834550ea0d Speed up group minimum and group output calculations for EXP_D25 and EXP_D45
in encode_exponents_blk_ch() by removing the inner loops. This is about 30-40%
faster for the modified sections.

Originally committed as revision 26036 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:16 +00:00
Justin Ruggles
cdedf7e625 Convert a for() loop into a while() loop for the downward part of the exponent
delta limiting.

Originally committed as revision 26035 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:08 +00:00
Justin Ruggles
27af78cf0e Redesign encode_exponents_blk_ch() so that duplicate exponent sets are no
longer required. This gets rid of the temp buffer as well as encoded_exp in
AC3EncodeContext. It also allows for skipping the exponent grouping for
EXP_D15. 56% faster in encode_exponents_blk_ch().

Originally committed as revision 26034 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:02 +00:00
Justin Ruggles
8846ee54ad Use optimized function DSPContext.sad[0]() instead of calc_exp_diff().
90% faster compute_exp_strategy().

Originally committed as revision 26033 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 15:06:28 +00:00
Justin Ruggles
7786c384f6 cosmetics: pretty-printing after last commit
Originally committed as revision 26031 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:35 +00:00
Justin Ruggles
89bedc4d2e Add a goto for init failure instead of duplicate calls to ac3_encode_close().
Originally committed as revision 26030 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:32 +00:00
Justin Ruggles
c41ac4f82e Use pre-allocated temp buffers in mdct512().
5% faster in function.

Originally committed as revision 26029 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:29 +00:00
Justin Ruggles
e29065f7bf Write results of post-rotation complex multiply directly to output.
2% faster in function mdct512().

Originally committed as revision 26028 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:13:45 +00:00
Justin Ruggles
9d8533368f Use memcpy() instead of a for loop in mdct512().
8% faster in function.

Originally committed as revision 26027 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:13:41 +00:00
Justin Ruggles
b6f6204db9 Allocate all large per-channel arrays using av_malloc().
Decreases memory usage for less than 6 channels.

Originally committed as revision 26026 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:33:02 +00:00
Justin Ruggles
aa645b9888 Make windowed_samples 16-byte aligned.
This will allow future SIMD optimization of the window function.

Originally committed as revision 26025 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:32:59 +00:00
Justin Ruggles
e8d21fba3f Allocate planar_samples using av_mallocz().
Lowers memory usage when encoding less than 6 channels.

Originally committed as revision 26024 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:32:55 +00:00
Justin Ruggles
171bc51c9b Allocate bap and bap1 buffers using av_malloc().
This reduces the memory footprint when using less than 6 channels.
Modify bit allocation to swap the 2 buffers instead of using memcpy() and use
per-block pointers for bap. This is slightly faster (0.3%) in function
cbr_bit_allocation().

Originally committed as revision 26023 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 21:12:28 +00:00
Justin Ruggles
1c3e117e0b Remove last_samples[] and copy directly from planar_samples[].
Avoids memcpy that was used to store last samples for next frame.
Approx. 3% faster in function deinterleave_input_samples() and reduces memory
usage by 3kB.

Originally committed as revision 26021 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:52 +00:00
Justin Ruggles
7eeca961e3 Remove unneeded line. key_frame is already set to 1 in avcodec_alloc_frame().
Originally committed as revision 26020 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:49 +00:00
Justin Ruggles
2d82d9b1df cosmetics: comment clean-up and misc cosmetics
Originally committed as revision 26019 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:44 +00:00
Justin Ruggles
5901cebecd Separate most of the per-block arrays into a separate per-block struct.
Originally committed as revision 26018 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:41 +00:00
Justin Ruggles
cb6247cb30 Split bit allocation search into a separate function.
Originally committed as revision 26017 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:38 +00:00
Alexander Strange
0f01602362 SVQ3: Allow decoding if thread_count is > 1
svq3 still doesn't support multithreading, but it's simpler for clients if
they can enable threading for all codecs by default.

Originally committed as revision 26015 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 00:22:47 +00:00
Justin Ruggles
06f6f78578 10l: fix typo in compute_exp_strategy()
Originally committed as revision 26013 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:35 +00:00
Justin Ruggles
266d24be4a Move large arrays to AC3EncodeContext rather than passing them around.
Originally committed as revision 26012 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:31 +00:00
Justin Ruggles
7da4dc17d9 cosmetics: line wrap and spacing
Originally committed as revision 26011 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:28 +00:00
Justin Ruggles
a0d763fc88 Use a single value for SNR offset in the bit allocation search rather than
the separate coarse and fine values.

Originally committed as revision 26010 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:22 +00:00
Justin Ruggles
70fcd7ea80 Change bit_alloc() to return the mantissa bit count.
Originally committed as revision 26009 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:19 +00:00
Justin Ruggles
937cd1467c cosmetics: alignment and line wrap after last commit
Originally committed as revision 26008 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:15 +00:00
Justin Ruggles
359c1d1926 Move bit counts to AC3EncodeContext.
Originally committed as revision 26007 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:12 +00:00
Justin Ruggles
793bbf9544 Split out setting of bit allocation parameters to a separate function.
Th new function only needs to be called at initialization because bit
allocation parameters currently do not change during encoding.

Originally committed as revision 26003 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:43 +00:00
Justin Ruggles
8999944ecb Split out counting of frame bits into a separate function.
Originally committed as revision 26002 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:40 +00:00
Justin Ruggles
33a7d549e8 cosmetics: vertical alignment
Originally committed as revision 26001 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:36 +00:00
Justin Ruggles
d3325d555b Only calculate num_exp_groups once.
Originally committed as revision 26000 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:33 +00:00
Justin Ruggles
dc0bc0f84e Check for bit allocation error in ac3_encode_frame().
Move error log printout to ac3_encode_frame().

Originally committed as revision 25999 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:30 +00:00
Justin Ruggles
f94bacc538 Split out grouping of exponents into a separate function.
Originally committed as revision 25998 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:26 +00:00
Justin Ruggles
b6a1e5236e Split out mantissa quantization into separate functions.
Originally committed as revision 25997 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:23 +00:00
Justin Ruggles
5b44ede0ba cosmetics: rearrange some functions
Originally committed as revision 25996 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:20 +00:00
Justin Ruggles
d7da80806c Reverse the exponent & exponent strategy array arrangement to simplify the
per-channel exponent strategy decision.  This will also make it easier to
plug-in other exponent strategy algorithms.

Originally committed as revision 25995 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:17 +00:00
Justin Ruggles
67d979fede Move writing of frame to the output bitstream to a separate function.
Originally committed as revision 25994 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:13 +00:00
Justin Ruggles
084f5c5afe cosmetics: remove a comment and just spacing
Originally committed as revision 25993 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:10 +00:00
Justin Ruggles
160d85f5b0 Split frame size adjustment into a separate function.
Originally committed as revision 25992 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:06 +00:00
Justin Ruggles
dfdf73eb1a Split exponent processing into separate functions.
Originally committed as revision 25991 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:02 +00:00
Justin Ruggles
0a0a8500fb Split applying of MDCT into several separate functions.
Originally committed as revision 25990 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:59 +00:00
Justin Ruggles
4acc790f3c Split input sample deinterleaving into a separate function.
Originally committed as revision 25989 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:56 +00:00
Justin Ruggles
152cc52803 Separate functionally different calculations in ac3_encode_frame().
Originally committed as revision 25988 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:53 +00:00
Justin Ruggles
98f6ee4453 cosmetics: rename 2 variables
Originally committed as revision 25987 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:49 +00:00
Justin Ruggles
12ed622699 Deinterleave whole frame at once instead of per-block.
This reduces the amount of memcpy() by using pointers to overlap samples for
successive blocks rather than copying.

Originally committed as revision 25986 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:46 +00:00
Justin Ruggles
e0685bc98f cosmetics: add & alter some comments
Originally committed as revision 25985 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:43 +00:00
Justin Ruggles
282255bbd2 Split setting of bandwidth into a separate function.
Originally committed as revision 25984 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:40 +00:00
Justin Ruggles
e35c984a5d Move setting of bitstream_id and bitstream_mode to ac3_encode_init().
Originally committed as revision 25983 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:37 +00:00
Justin Ruggles
ddf63d37b8 Improve ac3_encode_init() error reporting.
Return AVERROR(EINVAL) instead of -1. Propogate errors from called functions.
Add some error log printouts.

Originally committed as revision 25982 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:34 +00:00
Justin Ruggles
b64d842c1d cosmetics: indent after last commit
Originally committed as revision 25981 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:30 +00:00
Justin Ruggles
99ca4f73f0 Don't use nested loops to iterate valid sample rates.
Eliminates a goto and mirrors the bitrate validation.

Originally committed as revision 25980 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:25 +00:00
Justin Ruggles
1607db0a95 Remove some duplicate local copies of avctx fields.
This is an av_cold function, and we don't need to duplicate variables just to
save a few characters.

Originally committed as revision 25979 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:21 +00:00
Justin Ruggles
8f60f70d44 Split validation of initial user options into a separate function.
Originally committed as revision 25978 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:18 +00:00
Justin Ruggles
427e2293d3 Use bytes instead of 16-bit words for frame size.
Originally committed as revision 25977 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:14 +00:00
Justin Ruggles
eed00252c9 cosmetics: rename variable 'n' to 'pad_bytes'
Originally committed as revision 25976 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:12 +00:00
Justin Ruggles
1971ab6ed6 Change output_frame_end() to return void. The frame size is already known.
Originally committed as revision 25975 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:08 +00:00
Justin Ruggles
e8b552a818 cosmetics: pretty-printing
Originally committed as revision 25974 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:04 +00:00
Justin Ruggles
ce67b7cd38 cosmetics: rename some iterator variables to match what they represent
Originally committed as revision 25973 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:00 +00:00
Justin Ruggles
777732756a cosmetics: rename a variable for consistency
Originally committed as revision 25972 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:56 +00:00
Justin Ruggles
aab45ca3de cosmetics: rename exp_samples and global_exp to exp_shift.
Originally committed as revision 25971 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:53 +00:00
Justin Ruggles
23c5b361a6 cosmetics: rename 2 functions
Originally committed as revision 25970 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:50 +00:00
Justin Ruggles
e0b9f94b39 cosmetics: use some size macros in ac3tab.c/h
Originally committed as revision 25969 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:47 +00:00
Justin Ruggles
ce571ceb45 Use AC3_MAX_COEFS instead of 256 in a couple places in ac3.c
Originally committed as revision 25968 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:43 +00:00
Justin Ruggles
47ae6e795b define AC3_CRITICAL_BANDS and use it in the AC-3 encoder and decoder.
Originally committed as revision 25967 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:40 +00:00
Justin Ruggles
0454b55801 Use sizeof(array value) instead of sizeof(int16_t).
Originally committed as revision 25966 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:36 +00:00
Justin Ruggles
a0a9204e49 cosmetics: use lowercase letters for function names
Originally committed as revision 25965 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:33 +00:00
Justin Ruggles
c36ce0f8df cosmetics: add new function documentation and clean up existing documentation
Originally committed as revision 25964 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:30 +00:00
Justin Ruggles
2f8ae52228 cosmetics: add more space between functions
Originally committed as revision 25963 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:26 +00:00
Justin Ruggles
e77fd066fb cosmetics: rearrange some functions/typedefs/macros
Originally committed as revision 25962 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:23 +00:00
Justin Ruggles
02877def49 Simplify group size calculation in 2 places.
Originally committed as revision 25961 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:20 +00:00
Justin Ruggles
9816155337 cosmetics: make a switch/case more compact
Originally committed as revision 25960 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:17 +00:00
Justin Ruggles
b84a211bc8 Clean up fft_init() and mdct_init()
Originally committed as revision 25959 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:12 +00:00
Justin Ruggles
6a988808a4 cosmetics: pretty-printing, alignment, etc...
Originally committed as revision 25958 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:09 +00:00
Justin Ruggles
a913b5cf60 Remove unneeded #include
Originally committed as revision 25957 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:05 +00:00
Justin Ruggles
918cd2255c Simplify fix15().
Turn it into 2 macros, and use av_clip_int16() and lrintf().
This matches the int16 to float sample conversion in audioconvert.c.
The regression test output is different due to lrintf() rounding.

Originally committed as revision 25956 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:02 +00:00
Justin Ruggles
228315bbd3 Fix the fixed-point MDCT and FFT tests so that they actually compile and work.
Also, use LFG from libavutil instead of random().

Originally committed as revision 25955 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:58 +00:00
Justin Ruggles
a8d2b06b7c Split out initialization of MDCT tables into a separate function.
Originally committed as revision 25954 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:54 +00:00
Justin Ruggles
0796546370 cosmetics: Document AC3EncodeContext fields.
Originally committed as revision 25953 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:49 +00:00
Justin Ruggles
22c0b03c8f Remove unneeded debugging messages.
Originally committed as revision 25952 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:45 +00:00
Justin Ruggles
1fda2c10f6 cosmetics: Define AC3_WINDOW_SIZE and use it instead of AC3_BLOCK_SIZE*2.
Originally committed as revision 25951 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:40 +00:00
Justin Ruggles
7066cc8f2b cosmetics: use better (and shared) macro names for some constant values
Originally committed as revision 25950 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:34 +00:00
Justin Ruggles
a657899cf7 Remove duplicate AC3EncodeContext fields, sr_shift and sr_code.
Originally committed as revision 25949 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:30 +00:00
Justin Ruggles
2d2692eb49 cosmetics: rename some fields in AC3EncodeContext
Originally committed as revision 25948 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:27 +00:00
Justin Ruggles
9cb5903299 cosmetics: change all short to int16_t
Originally committed as revision 25947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:23 +00:00
Justin Ruggles
2be209b213 Change some unsigned types to signed types in AC3EncodeContext
Originally committed as revision 25946 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:20 +00:00
Justin Ruggles
7e5a4bf8ba cosmetics: rearrange AC3EncodeContext fields
Originally committed as revision 25945 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:15 +00:00
Reimar Döffinger
0c1758f018 Return the amount of input data actually used in the qdm2 decoder,
allows playback of files where multiple qdm2 packets have been merged.

Originally committed as revision 25943 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-13 17:54:00 +00:00
James Zern
9d845ca40c Avoid rollover in settings conversion.
Patch by James Zern, jzern google

Originally committed as revision 25941 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 16:27:32 +00:00
Stefano Sabatini
4ba22e044b Fix avpicture_alloc(), which was aligning the linesizes with 0 and thus
causing a wrong allocation.

Originally committed as revision 25938 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 15:31:49 +00:00
Michael Niedermayer
b276854d06 Fix indention of one forgotten line in ffv1.c
Originally committed as revision 25935 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 02:54:21 +00:00
Justin Ruggles
92b818eb9e cosmetics: vertical alignment after last commit
Originally committed as revision 25934 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 00:53:01 +00:00
Michael Chinen
7edbd5361c flac_parser: only buffer the estimated amount of input needed.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25933 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 00:52:57 +00:00
Michael Chinen
97f7fe687a Make FLAC parser return frames when it has the required amount
(without buffering extra input).
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25932 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 00:52:54 +00:00
Stefano Sabatini
c61cdd0afb Move AV_NOPTS_VALUE, AV_TIME_BASE, AV_TIME_BASE_Q symbols from
libavcodec to libavcore.

Remove another compile-time dependancy of libavfilter on libavcodec.

Originally committed as revision 25923 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-09 17:27:33 +00:00
Stefano Sabatini
6d34323ee6 Make avpicture_alloc() return meaningful values.
Originally committed as revision 25922 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-08 10:24:09 +00:00
Stefano Sabatini
0141163d6a Reindent.
Originally committed as revision 25921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-08 10:24:07 +00:00
Stefano Sabatini
e74929e8bb Use av_image_alloc() in avpicture_alloc(), simplify.
Originally committed as revision 25920 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-08 10:24:02 +00:00
Michael Chinen
a4151444bd Define FLAC_MIN_FRAME_SIZE and use it in the FLAC decoder.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25916 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:58:34 +00:00
Michael Chinen
60a684939a Simplify the FLAC decoder now that it no longer has to parse arbitrary raw FLAC
data thanks to the recently added FLAC parser.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25915 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:57:02 +00:00
Michael Chinen
475ae04a27 Add a FLAC parser.
Seek test reference updated because FLAC seeking now works properly.
Fixes roundup issue 1150.

Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25914 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:50:50 +00:00
Justin Ruggles
ed4e1e5833 cosmetics: line wrap after last commit
Originally committed as revision 25913 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:02:42 +00:00
Michael Chinen
3c795698d0 Add log_level_offset parameter to ff_flac_decode_frame_header(). It will be used
to optionally silence the error messages.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:00:38 +00:00
Michael Chinen
71b6fc216c Add is_var_size and frame_or_sample_num to FLACFrameInfo and read them in
ff_flac_decode_frame_header().
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25911 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:50:13 +00:00
Michael Chinen
7f4e432148 Check validity of the frame sync code in ff_flac_decode_frame_header().
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25910 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:42:52 +00:00
Michael Chinen
625daac4bd Move decode_frame_header() from flacdec.c to flac.c/h to share with the
forthcoming FLAC parser.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25909 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:30:18 +00:00
Jason Garrett-Glaser
3cf8db9447 Add fullrange support to libx264.c x264 interface
Originally committed as revision 25904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 09:51:27 +00:00
Sprezz
efd63823e6 alsdec: Correct the ALS decoder by storing some parameters per-channel rather
than just per-block. Patch by Sprezz [sprezzatura gmx com]. Fixes Issue 2387.

Originally committed as revision 25898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 15:18:50 +00:00
Baptiste Coudurier
90f1f3bf00 In yadif filter, declare asm constants directly to avoid dependency on libavcodec
Originally committed as revision 25895 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 00:14:15 +00:00
Stefano Sabatini
16cfc96124 Add CODEC_CAP_NEG_LINESIZES.
Originally committed as revision 25886 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 19:06:45 +00:00
Stefano Sabatini
1c3b408f88 Add forgotten deprecation to avcodec_pix_fmt_string().
Originally committed as revision 25883 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 14:14:12 +00:00
Baptiste Coudurier
9e95999e2a 10l, add ff_pw_1 to dsputil_mmx for yadif sse2
Originally committed as revision 25881 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 13:06:06 +00:00
Stefano Sabatini
bb4afa13dd Deprecate avcodec_pix_fmt_string() in favor of
av_get_pix_fmt_string(), added to libavutil/pixdesc.h.

Originally committed as revision 25879 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 12:56:21 +00:00
Michael Niedermayer
e75229faae Try to improve reordered_opaque doxy.
Originally committed as revision 25876 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 05:44:29 +00:00
Michael Niedermayer
df59c9c0f8 Detect incorrect padding with wrong stuffing codes used by NEC N-02B.
I dont know if this is the best way to handle it. But it fixes http://kuwatan.jp/temp/n-02b.3gp

Fixes issue 2373.

Originally committed as revision 25875 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 05:44:18 +00:00
Bobby Bingham
23b8342af4 Count non-header data towards intra block bit count in MJPEG encoder
Originally committed as revision 25873 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 05:21:03 +00:00
Michael Niedermayer
372c3f82b7 Change the argument of memory allocation functions from unsigned int to size_t
with the next major bump in libavcodec.

Originally committed as revision 25872 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 04:00:21 +00:00
Martin Storsjö
c6fe83a3e0 g722: Add a trellis encoder
The structure is largely based on the trellis encoder in adpcm.c.

Originally committed as revision 25866 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-03 21:18:45 +00:00
avcoder
1761272ba9 Use SECTION .text for yasm code.
Patch by avcoder, ffmpeg gmail

Originally committed as revision 25859 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-01 13:12:39 +00:00
Martin Storsjö
cfff297d98 adpcm: Skip samples whose ssd calculation has wrapped around
Wraparound in ssd is mainly avoided by subtracting the ssd of the
best node from all the others once it has grown large enough.

If using very large trellis sizes (e.g. -trellis 15), the frontier
is so large that the difference between the best and the worst is
large enough to cause wraparound, even if the ssd of the best one
is subtracted regularly.

When using -trellis 10 on a 30 second sample, this causes only a slight
slowdown, from 61 to 64 seconds.

Originally committed as revision 25858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-01 08:57:45 +00:00
Aurelien Jacobs
4ab4d65f35 ensure the ASS string in AVSubtitleRect is 0 terminated
Originally committed as revision 25832 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-27 01:07:06 +00:00
Anatoly Nenashev
9d09ebf1ed Mobotix .mxg demuxer
Patch by Anatoly Nenashev, anatoly d nenashev a ovsoft d ru

Originally committed as revision 25831 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-26 10:11:16 +00:00
Reimar Döffinger
782f69e8a5 Fix memleak: free palette data on close.
Originally committed as revision 25816 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 20:42:03 +00:00
Reimar Döffinger
097ea6db27 100l, fix missing decrement on split PGS packets.
Originally committed as revision 25810 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 07:01:49 +00:00
Baptiste Coudurier
9d252137e5 In h264 decoder, fix decoding when nal end sequence is present
Originally committed as revision 25809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 01:16:37 +00:00
Reimar Döffinger
6b133d7e9c Fail RLE decoding if insufficient data for a complete bitmap was decoded.
Originally committed as revision 25797 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 20:39:18 +00:00
Mark Goodman
83cd91122a Support PGS subtitles with RLE data split over mutiple packets.
Patch by Mark Goodman [mark goodman gmail com] with some modifications by me.

Originally committed as revision 25796 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 20:35:07 +00:00
Ramiro Polla
8f190d8b83 fix pointer truncation to int in avpicture_layout()
Originally committed as revision 25793 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 03:46:31 +00:00
Stefano Sabatini
d2cbdb17b5 Re-implement avpicture_layout() using pixdesc and imgutils API.
The new implementation is more compact, more correct and doesn't hurt
the eyes.

Originally committed as revision 25792 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 21:25:06 +00:00
Stefano Sabatini
6a269f35ee Replace "depth" with "nb_bits" in the header of avcodec_pix_fmt_string().
Originally committed as revision 25791 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 21:25:02 +00:00
Kostya Shishkov
7d3829a87a Musepack SV8 supports "mono" files (though it still codes them as stereo),
so extend decoder to output only one channel for it.

This fixes issue 2368.

Originally committed as revision 25790 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 20:42:06 +00:00
Stefano Sabatini
63e8d9760f Use the new libavcore audio channel API.
This also allows to remove a linking dependency of libavfilter on
libavcodec.

Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 20:06:22 +00:00
Stefano Sabatini
d6e602536c Remove declaration of function:
const char *avcodec_get_channel_name(int channel_id)

which was never implemented.

Originally committed as revision 25788 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 20:06:16 +00:00
Stefano Sabatini
176a6157c0 Move audio channel API from libavcodec to libavcore.
Originally committed as revision 25787 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 19:28:52 +00:00
Reimar Döffinger
18d761a1b1 Fix indentation.
Originally committed as revision 25780 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:38:08 +00:00
Reimar Döffinger
3354b05187 Add explanation and alternative implementation for strange xan
gamma correction.

Originally committed as revision 25779 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:37:26 +00:00
Reimar Döffinger
24ae353dfb WC3/xan: move palette handling to decoder, avoiding need for
PaletteControl.
This also fixes playback of some files with ffplay (images were
corrupted for a short time after a palette change).

Originally committed as revision 25778 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:32:23 +00:00
Reimar Döffinger
a08d918e68 Add a av_grow_packet function, to be used by code that merges
palette and video data packets to get rid of PaletteControl.

Originally committed as revision 25776 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:21:06 +00:00
Martin Storsjö
1a68e7ed15 adpcm: Fix a comment in the trellis heap code
This makes the wording consistent with how people usually talk about heaps.

Originally committed as revision 25775 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-20 11:24:19 +00:00
Martin Storsjö
78f9d35c9a adpcm: Only increment heap_pos after finding a good enough sample
This increases the PSNR slightly (about 0.1 dB) for trellis sizes
below 8, and gives equal PSNR for sizes above that.

Originally committed as revision 25769 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 17:36:29 +00:00
Martin Storsjö
d764e3ece9 adpcm: Use a hash table to improve checking for duplicate samples
This lowers the run time from 158 to 21 seconds, for -trellis 8
with a 30 second sample on my machine.

This requires 64 KB additional memory.

Originally committed as revision 25768 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 17:35:52 +00:00
Baptiste Coudurier
47d2ddca80 Fix qdm2 decoder packet handling to match the api
Originally committed as revision 25767 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 06:52:30 +00:00
Stefano Sabatini
5878d5bda3 Order matters, fix test files linking.
Originally committed as revision 25766 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 00:04:23 +00:00
Baptiste Coudurier
9d9c3e1a70 Make DNxHD encoder produce files that are strictly VC-3 compatible
Originally committed as revision 25756 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-16 01:00:55 +00:00
Kostya Shishkov
f3d77632d7 16l trocadero: Musepack SV7 decoder may skip more than 16 bits at the
beginning of the frame, so make it use skip_bits_long() instead of
skip_bits() for that.

Originally committed as revision 25754 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-15 09:30:20 +00:00
Aurelien Jacobs
c99f9b0ac7 minor bump and Changelog entry for r25747
Originally committed as revision 25753 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-14 17:33:43 +00:00
Aurelien Jacobs
c716f91757 minor bump and APIchanges for r25745
Originally committed as revision 25752 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-14 17:31:06 +00:00
Martin Storsjö
86abf868ec adpcm: Fix a comment
Originally committed as revision 25751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-14 10:23:58 +00:00
Aurelien Jacobs
5952be07dc add missing files in previous commit (ASS encoder and decoder)
Originally committed as revision 25747 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 14:18:59 +00:00
Aurelien Jacobs
e9c098dbaa add ASS encoder and decoder
Originally committed as revision 25746 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 14:17:57 +00:00
Aurelien Jacobs
cb2c971d91 allow passing subtitles header between decoder and encoder
Originally committed as revision 25745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 13:57:49 +00:00
Vitor Sessak
c4e8733ac1 Fix visual artifacts in 4XM decoding on big-endian system
Originally committed as revision 25734 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 19:55:26 +00:00
Martin Storsjö
38b3bda18f adpcm: Replace any of the leaf nodes in the heap
By not looking for the exactly largest node, we avoid an O(n) seek through
the leaf nodes. Just pick one (not the same one every time) and try replacing
that node with the new one.

For -trellis 8, this lowers the run time from 190 to 158 seconds,
for a 30 second 44 kHz mono sample, on my machine.

Originally committed as revision 25733 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 12:30:27 +00:00
Martin Storsjö
4106b7f1cd Reindent
Originally committed as revision 25732 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 12:28:02 +00:00
Martin Storsjö
f82e8f3482 adpcm: Store the trellis nodes in a heap instead of a sorted array
This avoids having to memmove the large parts of the array when inserting into
it.

For -trellis 8, this lowers the run time from 245 seconds to 190 seconds,
for a 30 second 44 kHz mono sample, on my machine.

Originally committed as revision 25731 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 12:27:27 +00:00
Stefano Sabatini
5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Alex Converse
5fb2f1347e 10l: dx shouldn't exist.
sorry sorry sorry sorry

Originally committed as revision 25726 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 05:38:57 +00:00
Alex Converse
0611f67525 10l: vorbisdec: declare dy
Originally committed as revision 25725 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 05:34:32 +00:00
Gregory Maxwell
8455e8c7c0 vorbisdec: Fix floor1 decoding
An intermediate value in the floor 1 linear interpolation was
overflowing
resulting in obvious artifacts on some files.

e.g.
http://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv

Prior to this fix 87 out of 128 64kbit/s mono files decoded with ffmpeg
have
lower PEAQ ODG values than the same files decoded with libvorbis. With
this
fix none of that set have significantly worse ODG values than libvorbis.

Fixes issue 2352

Patch by Gregory Maxwell <greg@xiph.org>

Originally committed as revision 25724 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 04:33:26 +00:00
Nicolas George
ba83c4bfb5 MJPEG/AVI1 to JPEG/JFIF bitstream filter.
Originally committed as revision 25721 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-11 15:24:11 +00:00
Jason Garrett-Glaser
2c5168afed Remove bitrate tolerance from libx264 interface
Nobody ever uses it correctly, and ffmpeg sets it incorrectly, so we'll just
leave it out.

Originally committed as revision 25720 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-11 14:34:27 +00:00
Stefano Sabatini
119a34f716 In avcodec_pix_fmt_string() use local variable pixdesc rather than
av_pix_fmt_descriptors[pix_fmt], simplify.

Originally committed as revision 25718 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-10 20:13:24 +00:00
Stefano Sabatini
2de6f6e828 Make avcodec_pix_fmt_string() use the information in the pixel format
descriptors for printing the number of channels/components.

Also replace the term "nb_channels" with "nb_components" which is more
consistent with the FFmpeg internal terminology, and is somehow
different with respect to the current definition of nb_channels in
PixFmtInfo.

See thread:
Subject: [FFmpeg-devel] [PATCH 6/8] Make avcodec_pix_fmt_string() use the
        information in the pixel format descriptors for printing the
        number of planes. Also replace the term "nb_channels" with
        "nb_planes" which is more correct.
Date: Fri,  5 Nov 2010 12:01:38 +0100

Originally committed as revision 25717 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-10 20:13:19 +00:00
Nicolas Kaiser
fe655f6723 Simplify: Remove impossible condition.
Patch by Nicolas Kaiser, nikai nikai net

Originally committed as revision 25714 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-09 23:58:41 +00:00
Stefano Sabatini
ed5d30d91c Move internal function ff_set_systematic_pal() to libavcore, and
rename it ff_set_systematic_pal2().

Originally committed as revision 25712 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-09 22:22:36 +00:00
Thilo Borgmann
a29039aef3 Reindent after last commit.
Originally committed as revision 25711 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 15:24:11 +00:00
Thilo Borgmann
4051ae7617 Allow clean initialization of lut_status array by changing type to signed int.
Originally committed as revision 25710 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 15:22:15 +00:00
Stefano Sabatini
d2af7205a1 Use hierarchic names convention (prefix them with av_expr) for the
eval API.

More grep-friendly and more consistent with the rest of the FFmpeg
API.

Originally committed as revision 25708 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 14:06:49 +00:00
Stefano Sabatini
46db10ed0e Optimize / simplify avcodec_get_pix_fmt_name() check.
Originally committed as revision 25689 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 15:04:35 +00:00
Stefano Sabatini
a5f27f6db8 Use av_pix_fmt_descriptors information in avcodec_pix_fmt_string().
Originally committed as revision 25688 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 13:30:39 +00:00
Stefano Sabatini
f35a41ff5d Make avpicture_fill() return a meaningful error code.
Originally committed as revision 25687 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 13:30:36 +00:00
Stefano Sabatini
24409b5053 Remove alpha information from avcodec_pix_fmt_string(), as that
information does not belong to the pixel format.

Originally committed as revision 25686 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 13:01:12 +00:00
Alex Converse
ebb7f7de82 aaclatm: Eliminate dummy packets due to muxlength calculation.
Muxlength does not include the 3 bytes of AudioSyncStream() before the
AudioMuxElement(). If these three bytes are not accounted for the last three
bytes of the LATM packet are sent back to the decoder again.

Fixes issue244/mux2.share.ts

Originally committed as revision 25685 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 03:05:12 +00:00
Reimar Döffinger
c4d5ee233a Fix indentation.
Originally committed as revision 25683 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-06 16:48:41 +00:00
Reimar Döffinger
931856a267 Improve PGS parsing: the "state" field is not relevant to us,
the object number is, it determines whether we should continue
parsing the presentation description and whether we should
clear the subtitles on the next display command.
Based on patch by Mark Goodman [mark goodman gmail com]

Originally committed as revision 25682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-06 16:46:03 +00:00
Kostya Shishkov
c5cb9c946b try to give TrueSpeech decoder tables more sensible names
Originally committed as revision 25681 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-06 13:31:17 +00:00