Commit Graph

13995 Commits

Author SHA1 Message Date
Mans Rullgard
e4b5a204aa x86: h264: remove hardcoded eax in decode_significance[_8x8]_x86()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
3146a30e61 x86: cabac: change 'a' constraint to 'r' in get_cabac_inline()
Nothing requires this value in %eax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
f743595e87 x86: cabac: remove hardcoded esi in get_cabac_inline()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
da3af4db61 x86: cabac: remove hardcoded edx in get_cabac_inline()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
51f16a9bf2 x86: cabac: remove unused macro parameter
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
018c33838e x86: cabac: remove hardcoded ebx in inline asm
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
6b712acc0e x86: cabac: remove hardcoded struct offsets from inline asm
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
34ee43fc0f cabac: remove inline asm under #if 0
A comment says it's not faster than the C code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
8fcc0e7978 cabac: remove BRANCHLESS_CABAC_DECODER switch
The code does not compile without this set.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:29 +01:00
Mans Rullgard
eaa2d5a90a cabac: remove #if 0 cascade under never-set #ifdef ARCH_X86_DISABLED
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:29 +01:00
Ronald Bultje
20153fb8f6 error_resilience: skip last-MV predictor step if MVs are not available.
Fixes crashes when playing broken MPEG2-TS streams.
2011-06-20 22:18:27 +02:00
Ronald Bultje
d42aaa802e error_resilience: actually add counter when adding a MV predictor.
Without, the predictor isn't actually used.
2011-06-20 22:18:23 +02:00
Michael Niedermayer
3a07f5a47a qdm2: Fix alignment of local array.
Fixes ticket270

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-20 21:03:59 +02:00
Ronald S. Bultje
ea6331f8bb h264-mt: fix deadlock in packets with multiple slices (e.g. MP4). 2011-06-20 10:24:33 -04:00
Alex Converse
4b84d5114d sipr: Drop unused DSPContext 2011-06-18 22:12:21 -07:00
Alex Converse
1e3d5eec8e sipr: include string.h for mem*() 2011-06-18 22:12:21 -07:00
Alex Converse
cb372931ff sipr: Use memmove() to copy overlapped buffers. 2011-06-18 22:12:21 -07:00
Alex Converse
0c17beba97 h264: drop some ugly casts 2011-06-18 22:11:55 -07:00
Ronald S. Bultje
ed63f527f2 Fix build if yasm is not available. 2011-06-18 08:34:14 -04:00
Daniel Kang
f188a1e0ca H.264: Add x86 assembly for 10-bit MC Chroma H.264 functions.
Mainly ported from 8-bit H.264 MC Chroma.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-18 07:52:19 -04:00
Anton Khirnov
78440c007c lavc: add opt_find to AVCodecContext class.
Fixes encoder private options, which are broken now in ffmpeg, because
opt_default2() can't find them, thus making opt_default() to fail.
2011-06-17 06:39:42 +02:00
Alexander Strange
3803af22d8 h264: Complexify frame num gap shortening code
By observation it did not seem to handle prev_frame_num > frame_num.
This does not affect any files I have.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-16 20:51:51 +02:00
Mike Scheutzow
aa15e68721 Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
One of the causes of this bug is that the h264 parser defaults low_delay
to 1, but the h264 codec defaults low_delay to 0. Really Ugly.

After many hours of looking at this, I'm still not sure how has_b_frames
is *intended* to behave, but to me the implementation appears way more
complicated than it ought to be.

My patch relies on the encoder to set an optional field in the SPS. This
works for libx264 streams, but I'm not sure that all h264 encoders will
set it.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-16 20:24:58 +02:00
Justin Ruggles
b203f65451 ac3enc: use correct alignment and length in channel coupling dsp functions.
This fixes a segfault when using the C version of ac3dsp.float_to_fixed24().
2011-06-15 17:56:49 -04:00
Mans Rullgard
88ff180ad6 ARM: update ff_h264_idct8_add4_neon for 4:4:4 changes
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-15 13:19:40 +01:00
Mans Rullgard
e897a633cd ARM: factor some repetitive code into macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-14 10:43:54 +01:00
Jason Garrett-Glaser
11177a4d82 Fix SVQ3 after adding 4:4:4 H.264 support 2011-06-13 21:16:36 -07:00
Jason Garrett-Glaser
7b442ad918 H.264: fix CODEC_FLAG_GRAY
It was broken in 4:4:4, and still did chroma deblocking for no reason in 4:2:0.
2011-06-13 21:16:33 -07:00
Jason Garrett-Glaser
c90b94424c 4:4:4 H.264 decoding support
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
2011-06-13 21:16:30 -07:00
Justin Ruggles
99477adc31 ac3enc: fix allocation of floating point samples.
sizeof(SampleType) is different for fixed and float encoders.
2011-06-13 17:49:37 -04:00
Justin Ruggles
38c304addd ac3enc: remove empty ac3_float function that is never called 2011-06-13 16:49:35 -04:00
Justin Ruggles
e0cc66df61 ac3enc: split templated float vs. fixed functions into a separate file.
Function pointers are used for templated functions instead of needlessly
duplicating many functions.
2011-06-13 16:49:35 -04:00
Justin Ruggles
e754dfc0bb ac3enc: dynamically allocate AC3EncodeContext fields windowed_samples and mdct
This will allow the same struct to be used for both the fixed and float ac3
encoders.
2011-06-13 16:49:35 -04:00
Justin Ruggles
36151b3e31 ac3enc: use function pointer to choose between AC-3 and E-AC-3 header output
functions.
2011-06-13 16:49:35 -04:00
Jason Garrett-Glaser
504811baea Roll back 4:4:4 H.264 for now
Needs some ARM/PPC asm modifications.
2011-06-13 13:38:46 -07:00
Jason Garrett-Glaser
295f0a2503 Fix SVQ3 after adding 4:4:4 H.264 support 2011-06-13 12:21:51 -07:00
Jason Garrett-Glaser
c177cfb4fb H.264: fix CODEC_FLAG_GRAY
It was broken in 4:4:4, and still did chroma deblocking for no reason in 4:2:0.
2011-06-13 12:21:49 -07:00
Jason Garrett-Glaser
c9c493872c 4:4:4 H.264 decoding support
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
2011-06-13 12:21:39 -07:00
Philip Langdale
25f05ddb1a h264_parser: Fix whitespace after previous change.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:51:58 +02:00
Philip Langdale
a26ce1e2df h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set.
Currently, the parser is buggy and only processes the stream extradata
when the flag is set. This fixes it to actually inspect the frames.

Whitespce will be fixed in a separate change.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:51:42 +02:00
Michael Niedermayer
108f318d90 h264: don't be so picky on decoding pps in extradata.
Fixes issue2517

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:45:09 +02:00
Wim Lewis
3de33b00de avcodec.h: add or elaborate on some documentation comments.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:44:51 +02:00
Michael Niedermayer
33aec3f402 h264: change a few comments into error messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:44:14 +02:00
Reimar Döffinger
86961eeabf ac3dec: fix doxy-style for comment ("///>" should be "///<" instead).
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:43:52 +02:00
Michael Niedermayer
294e5475c2 ffv1: fix undefined behavior with insane widths.
The new tables is large enough to prevent this together with our image size checks.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:42:14 +02:00
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