Commit Graph

13529 Commits

Author SHA1 Message Date
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