Commit Graph

13995 Commits

Author SHA1 Message Date
John Stebbins
49c7006c7e dca: set AVCodecContext frame_size for DTS audio
Set the frame size when decoding DTS audio.

This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields.  Since frame_size is
not currently set, the duration of a frame is being guessed based on the streams bitrate.  But for DTS-HD, the bitrate
currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly
inaccurate frame duration estimate.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-04 10:18:14 -07:00
Daniel Kang
3c7c16fde3 YASM: Shut up unused variable compiler warning with --disable-yasm.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-07-04 18:49:09 +02:00
Daniel Kang
567a32b5b2 x86_32: Fix build on x86_32 with --disable-yasm.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-04 08:47:09 -07:00
Mans Rullgard
75a24bef4a iirfilter: add fate test
Change the test program to output text instead of binary files so
it can be compared easily in FATE.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 16:26:26 +01:00
Diego Biurrun
66e2dd1187 doxygen: Add qmul docs. 2011-07-04 16:20:34 +02:00
Jason Garrett-Glaser
5029a40633 H.264: fix overreads of qscale_table
filter_mb_fast assumed that qscale_table was padded like many of the other tables.
2011-07-04 06:39:20 -07:00
Diego Biurrun
e589e4b82d Remove unused static tables and static inline functions. 2011-07-04 14:59:35 +02:00
Mans Rullgard
74965f2644 dct-test: remove 'ref' function pointer from tables
The reference function can be inferred from the direction of the
transform, no need for storing it with each entry.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 12:31:47 +01:00
Diego Biurrun
e3759c567d Add LGPL license boilerplate to files lacking it. 2011-07-04 12:54:26 +02:00
Diego Biurrun
3c432e1186 doxygen: Fix documentation for some VP8 functions. 2011-07-04 12:54:26 +02:00
Christian Schmidt
6c374bc0b4 libxvid: add missing include of libavutil/mathematics.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 10:55:38 +01:00
Mans Rullgard
dbf396d497 dct-test: exit with non-zero status if an IDCT fails
IDCTs are partially evaluated according to IEEE 1180-1990 (more or
less).  An override is added to the table for implementations known
to not meet the spec requirements.  These variants are run but not
checked for accuracy.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 10:38:14 +01:00
Mans Rullgard
7fd2c13888 dct-test: make speed test optional
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:54:08 +01:00
Mans Rullgard
cf2b4f884d dct-test: remove is_idct field from tables
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:54:08 +01:00
Mans Rullgard
4b357756b1 dct-test: split table in two for idct and fdct
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:54:08 +01:00
Mans Rullgard
4f905a658b dct-test: simplify calling dct_error()
Pass a pointer to the DCT descriptor instead of each field
individually.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:54:08 +01:00
Mans Rullgard
36fa9ef3e2 dct-test: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:54:08 +01:00
Mans Rullgard
412594ed0a dct-test: remove commented out code
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:54:08 +01:00
Robert Swain
954a653216 vorbis: vpxenc: Add missing include for av_rescale*
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 09:39:24 +01:00
Carl Eugen Hoyos
a4ab70f92e ffmpeg: Fix VDPAU decoding for some H264 samples. 2011-07-04 00:02:37 -07:00
Daniel Kang
58f7aad051 Fix build with --disable-yasm.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-03 22:56:09 -07:00
Jason Garrett-Glaser
556f8a066c H.264: template left MB handling
Faster H.264 decoding with ALLOW_INTERLACE off.
2011-07-03 15:06:00 -07:00
Jason Garrett-Glaser
ca80f11ec3 H.264: faster fill_decode_caches
Aliasing avoidance and general cleanup.
2011-07-03 15:05:57 -07:00
Jason Garrett-Glaser
3b7ebeb4d5 H.264: faster write_back_*
Avoid aliasing, unroll loops, and inline more functions.
2011-07-03 15:05:55 -07:00
Jason Garrett-Glaser
cb5469462d H.264: faster fill_filter_caches
Reduce aliasing problems and unroll mv/ref loop.
2011-07-03 15:05:52 -07:00
Jason Garrett-Glaser
4320a309ce H.264: make filter_mb_fast support the case of unavailable top mb
Significantly faster deblocking in streams with lots of slices.
2011-07-03 15:05:49 -07:00
Mans Rullgard
abc78a5a7c Do not include log.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Mans Rullgard
d49ea4afb4 Do not include pixfmt.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Mans Rullgard
e91709ca17 Do not include rational.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Mans Rullgard
0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Mans Rullgard
add41decd9 Remove return statements following infinite loops without break
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:39:07 +01:00
Diego Biurrun
ff993cd7fc doxygen: Drop array size declarations from Doxygen parameter names.
Adding [] to a Doxygen parameter name clashes with Doxygen syntax.
2011-07-03 18:30:02 +02:00
Diego Biurrun
24c9babaaf doxygen: Fix parameter names to match the function prototypes. 2011-07-03 18:30:02 +02:00
Diego Biurrun
01c17c88ed doxygen: Remove spurious documentation for non-existing function parameters. 2011-07-03 18:30:02 +02:00
Diego Biurrun
3d85acc8f7 doxygen: Fix execute_code() @return documentation. 2011-07-03 18:30:02 +02:00
Diego Biurrun
050f509065 snow: Remove unused code. 2011-07-03 18:30:01 +02:00
Daniel Kang
9bfa5363da H.264: Add x86 assembly for 10-bit H.264 qpel functions.
Mainly ported from 8-bit H.264 qpel.

Some code ported from x264. LGPL ok by author.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-03 07:43:38 -07:00
Mans Rullgard
6728aaf6d8 ffv1: remove unused tables
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:16:00 +01:00
Mans Rullgard
b27565b143 Remove statements immediately following unconditional jumps
This removes a number of compiler warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:15:53 +01:00
Mans Rullgard
050f2b3e7f mjpeg: remove pointless braces around block of code
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:15:48 +01:00
Mans Rullgard
21accb3bb2 h264: remove assert() immediately following return statement
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:09:15 +01:00
Mans Rullgard
5dd045ebc1 ARM: ac3: update ff_ac3_extract_exponents_neon per 8b7b2d6
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-02 18:24:41 +01:00
Mans Rullgard
8aa63f0b31 ARM: NEON optimised vector_clip_int32()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-02 18:24:41 +01:00
Stefano Sabatini
ccfa626db8 suggest to use av_get_bytes_per_sample() in av_get_bits_per_sample_format() doxy
The previously suggested replacement - av_get_bits_per_sample_fmt() -
was also deprecated.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-02 08:33:52 -07:00
Mans Rullgard
0d5c349ac4 put_bits: remove ALT_BITSTREAM_WRITER
The code for this variant does not compile.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-02 16:25:27 +01:00
Mans Rullgard
30b05520c8 put_bits: always use intreadwrite.h macros
This fixes invalid unaligned stores in some ARM configurations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-02 16:25:27 +01:00
Reinhard Tartler
21a19b7912 doxygen: Prefer member groups over grouping into modules
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.

Additionally, this commit streamlines some spelling and appearances.
2011-07-02 13:52:29 +02:00
Mans Rullgard
23ce6e7212 get_bits: remove x86 inline asm in A32 bitstream reader
x86 does not use this variant so having inline asm there
is pointless.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-01 22:18:50 +01:00
Justin Ruggles
f99a5ef92e ac3dsp: add x86-optimized versions of ac3dsp.extract_exponents(). 2011-07-01 13:02:11 -04:00
Justin Ruggles
8b7b2d6aae ac3dsp: simplify extract_exponents() now that it does not need to do clipping. 2011-07-01 13:02:11 -04:00
Justin Ruggles
523b7eba19 ac3enc: clip coefficients after MDCT.
This ensures that any processing between the MDCT and exponent extraction will
be using clipped coefficients.
2011-07-01 13:02:11 -04:00
Justin Ruggles
6054cd25b4 ac3enc: add int32_t array clipping function to DSPUtil, including x86 versions. 2011-07-01 13:02:11 -04:00
Diego Biurrun
be73d76b34 cosmetics: fix some then/than typos 2011-06-30 22:56:11 +02:00
Reinhard Tartler
d7537a6fce doxygen: Include libavcodec and libavformat examples into the documentation 2011-06-30 21:19:16 +02:00
Benjamin Larsson
dafaef2fe1 Add support for aac streams in mp4/mov without extradata. 2011-06-30 10:10:26 -07:00
Alex Converse
ce2649af3d aacenc: Make chan_map const correct 2011-06-29 17:37:31 -07:00
Nathan Caldwell
98add74e85 aacenc: Fix determination of Mid/Side Mode.
In adjust_frame_information(), msc is incremented for each sfb in each
sub-window then compared against max_sfb which is for a single sub-window.

This resulted in frames using EIGHT_SHORT_SEQUENCE where the first few
sub-windows increment msc to a value that results in ms_mode == 2. Even
though only some of the bands are actually using Mid/Side.
2011-06-29 14:28:53 -07:00
Nathan Caldwell
d3a6c2ab7e psymodel: Remove the single channel analysis function 2011-06-29 14:28:53 -07:00
Nathan Caldwell
01344fe409 aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel. 2011-06-29 14:28:53 -07:00
Nathan Caldwell
0bc01cc9fe psymodel: Add channels and channel groups to the psymodel. 2011-06-29 14:28:52 -07:00
Mans Rullgard
a3e1f80e8b ARM: remove check for PLD instruction
PLD is present in ARMv5TE and later, which is checked for separately.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 21:57:03 +01:00
Jason Garrett-Glaser
da55ee6ccc Add new yuv444 pixfmts to avcodec_align_dimensions2
Fixes draw_edges crashes with high-bit-depth 4:4:4 decoding.
2011-06-29 01:00:49 -07:00
Mans Rullgard
57b4a3dd2b build: include sub-makefiles using full path instead of symlinks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-28 18:15:19 +01:00
Justin Ruggles
bd2deab706 cosmetics: remove outdated comment that is no longer true 2011-06-28 11:03:42 -04:00
Diego Biurrun
bb00b15f9e avutil: Remove unused arbitrary precision integer code. 2011-06-28 13:14:46 +02:00
Diego Biurrun
d2ee495fb2 configure: Drop check for availability of ten assembler operands.
This was done to support gcc 2.95, which is an old legacy compiler
that fails to compile the current codebase anyway.
2011-06-28 13:14:37 +02:00
Nathan Caldwell
1bb52045d3 aacenc: Save channel configuration for later use. 2011-06-27 21:49:01 -07:00
Alex Converse
8dbaa5bd69 aacenc: Fix codebook trellising for zeroed bands.
Choose band type (codebook) zero, count its bits, and mark the other
states as unnavigable.
2011-06-27 21:47:45 -07:00
Justin Ruggles
8683c6a638 ac3enc: move ff_ac3_encode_frame() to ac3enc_template.c
This avoids using function pointers for quite a few small functions, most of
which just call DSP functions.
2011-06-27 12:59:39 -04:00
Justin Ruggles
668afae438 ac3enc: merge log2_tab() into normalize_samples() 2011-06-27 12:59:39 -04:00
Justin Ruggles
7dcdf974d0 ac3enc: Remove bit allocation fallbacks.
They introduce too much complexity for very little benefit. The result is that
encoding will be more likely to fail at extremely low bitrates where quality
would be awful anyway.
2011-06-27 12:59:39 -04:00
Jason Garrett-Glaser
9a0dda8b3a H.264: disable 2tap qpel with CODEC_FLAG2_FAST and >8-bit
2tap qpel isn't implemented yet for high bit depth, so it just breaks decoding.
2011-06-26 14:35:39 -07:00
Jason Garrett-Glaser
84153d1883 H.264: make filter_mb_fast support 4:4:4 2011-06-26 14:35:36 -07:00
Diego Biurrun
3fbc9bbb88 mpeg4videoenc: Remove disabled variant of mpeg4_encode_block().
As a nice sideeffect this fixes the following warning:
libavcodec/mpeg4videoenc.c:302:20: warning: variable ‘rl’ set but not used [-Wunused-but-set-variable]
2011-06-26 22:30:14 +02:00
Diego Biurrun
f3876ea485 Move some variable declarations below the proper #ifdefs.
This avoids warnings about set-but-unused variables.
2011-06-26 16:32:13 +02:00
Diego Biurrun
a6213f3dce build: Remove redundant config.mak includes from subdirectory Makefiles.
Calling Make from subdirectories is not supported and config.mak has
multiple inclusion guards anyway, so the top-level include is enough.
2011-06-25 13:02:51 +02:00
Diego Biurrun
3a0d0ff5e6 aacenc: Mark psy_3gpp_window() as av_unused.
It is intentionally left in to allow adding 3GPP-style windowing in the future.
Marking it av_unused silences an annoying unused function warning.
2011-06-25 11:39:36 +02:00
Diego Biurrun
adbfc605f6 doxygen: Consistently use '@' instead of '\' for Doxygen markup.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-24 00:37:49 +02:00
Martin Storsjö
9abbe8cc13 Use av_printf_format to check the usage of printf style functions
This helps catching cases where the format string doesn't
match what is passed in, or injection bugs where user data
is passed in as format string.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-06-23 20:17:46 +03:00
Mans Rullgard
8986fddc2b ARM: allow building in Thumb2 mode
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-23 07:31:54 +01:00
Justin Ruggles
684f4abfac ac3enc: remove unneeded local variable in asym_quant() 2011-06-22 12:18:10 -04:00
Justin Ruggles
f21fb76b1b ac3enc: remove a branch in asym_quant() by doing 2 shifts 2011-06-22 12:18:10 -04:00
Justin Ruggles
0e4dbe2996 ac3enc: avoid masking output in asym_quant() by using signed values for
quantized mantissas.
2011-06-22 12:18:10 -04:00
Jason Garrett-Glaser
2702a6f114 H.264: fix 4:4:4 + deblocking + 8x8dct + cavlc + MBAFF 2011-06-22 02:39:20 -07:00
Jason Garrett-Glaser
7c9079ab4c H.264: fix 4:4:4 + deblocking + MBAFF 2011-06-22 02:39:17 -07:00
Jason Garrett-Glaser
932db25024 H.264: fix 4:4:4 cropping warning 2011-06-22 02:39:14 -07:00
Jason Garrett-Glaser
85a88f9c0c H.264: reference the correct SPS in decode_scaling_matrices 2011-06-22 02:39:11 -07:00
Jason Garrett-Glaser
3b79f2e2e9 H.264: fix bug in lossless 4:4:4 decoding
Coefficient test for i16x16 add_pixels4 assumed luma plane.
2011-06-22 02:39:09 -07:00
ami_stuff
67e7dc5404 rawdec: Fix decoding of QT WRAW files.
From some tests it results that:
1. All of the AVI/MOV WRAW files need to be flipped.
2. MOV WRAW files need to use AVI color modes.
3. Assigning PAL8 mode by default to WRAW codec is not correct.
2011-06-21 22:18:59 +02:00
Carl Eugen Hoyos
53d5cd2c82 mov: Support Digital Voodoo SD 8 Bit and DTS codec identifiers. 2011-06-21 21:39:00 +02:00
ami_stuff
d352df0931 rawvideo: Support auv2 fourcc. 2011-06-21 21:33:58 +02:00
Diego Biurrun
6371ce4b0f h264: Fix assert that failed to compile with -DDEBUG.
The assert referenced a variable that no longer exists since 4:4:4 support.
2011-06-21 20:52:45 +02:00
Daniel Kang
84e70ef004 h264: Add x86 assembly for 10-bit weight/biweight H.264 functions.
Mainly ported from 8-bit H.264 weight/biweight.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-21 15:24:13 +02:00
Justin Ruggles
e6c52cee54 Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
av_get_bits_per_sample_fmt() is deprecated.
2011-06-20 18:56:06 -04:00
Mans Rullgard
c5ee740745 x86: cabac: fix register constraints for 32-bit mode
Some operands need to be accessed in byte mode, which restricts the
available registers in 32-bit mode.  Using the 'q' constraint selects
a suitable register.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 23:36:40 +01:00
Mans Rullgard
2143d69bdd cabac: move x86 asm to libavcodec/x86/cabac.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:31 +01:00
Mans Rullgard
d075e7d540 x86: h264: cast pointers to intptr_t rather than int
Only the low-order bits are used here so the type is not important,
but this avoids a compiler warning.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:31 +01:00
Mans Rullgard
3a4edb76d6 x86: h264: remove hardcoded edi in decode_significance_8x8_x86()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:31 +01:00
Mans Rullgard
b92c1a6d26 x86: h264: remove hardcoded esi in decode_significance[_8x8]_x86()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:31 +01:00
Mans Rullgard
3fc4e36c78 x86: h264: remove hardcoded edx in decode_significance[_8x8]_x86()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:31 +01:00
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