Commit Graph

16048 Commits

Author SHA1 Message Date
Hendrik Leppkes
ca93f0fa36 Add SMPTE240M transfer characteristics flag.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-05-03 12:15:02 -04:00
Alex Converse
b5da848fac motionpixels: Clip YUV values after applying a gradient.
Prevents illegal reads on truncated and malformed input.

CC: libav-stable@libav.org
2012-05-02 13:06:09 -07:00
Ronald S. Bultje
5eec5a79da jpeg: handle progressive in second field of interlaced.
Progressive data is allocated later in decode_sof(), not allocating
that data leads to NULL dereferences.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-05-02 10:29:51 -07:00
Michael Niedermayer
1f05dcbad2 ituh263dec: Implement enough of Annex O (scalability) to fix a FPE.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-05-02 10:26:05 -07:00
Ronald S. Bultje
2d22d4307d h263: more strictly forbid frame size changes with frame-mt.
Prevents crashes because the old check was incomplete.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-05-02 10:21:34 -07:00
Ronald S. Bultje
732f9fcfe5 h264: additional protection against unsupported size/bitdepth changes.
Fixes crashes in codepaths not covered by original checks.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-05-02 10:19:37 -07:00
Ronald S. Bultje
ac80b812cd tta: prevents overflows for 32bit integers in header.
This prevents sample_rate/data_length from going negative, which
caused various crashes and undefined behaviour further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-05-02 10:16:57 -07:00
Ronald S. Bultje
82a0497cf3 vp8: update frame size changes on thread context switches.
This properly synchronizes frame size changes between threads if
subsequent threads abort decoding before frame size is initialized, i.e.
it prevents the thread after that from ping-ponging back to the original
value.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-05-02 09:57:12 -07:00
Ronald S. Bultje
bec207f9f9 snowdsp: explicitily state instruction size.
Fixes a compile error with clang at -O0.
2012-05-02 09:57:12 -07:00
Kostya Shishkov
0e23b50821 wmall: fix reconstructing audio with uncoded channels 2012-05-02 18:46:11 +02:00
Mashiat Sarker Shakkhar
c8370e6e35 WMAL cosmetics: fix indentation
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-02 18:45:29 +02:00
Hendrik Leppkes
4b7fa553a9 indeo3: fix motion vector validation
The index of the motion vector has to be checked before being
multiplied by 2 for the array index.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-05-01 21:14:18 -04:00
Hendrik Leppkes
ff80c68264 pcm_bluray: set bits_per_raw_sample for > 16-bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-05-01 20:59:09 -04:00
Mans Rullgard
4bf2e7c5f1 twinvq: fix out of bounds array access
ModeTab.fmode has only 3 elements, so indexing it with ftype
in the initialier for 'size' is invalid when ftype == FT_PPC.

This fixes crashes with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 20:17:07 +01:00
Jakub Stachowski
035a394eac WMAL: do not output last frame again if nothing was decoded in current packet
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-01 14:34:03 +02:00
Mashiat Sarker Shakkhar
f92f452378 WMAL: do not start decoding if frame does not end in current packet
This fixes decoding of frames which span more than two packets. Tested with
recit24.wma.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-01 14:33:31 +02:00
Mans Rullgard
a812ed003f adpcm-thp: fix invalid array indexing
Indexing outside array limits is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard
c81d1e2390 ppc: add const where needed in scalarproduct_int16_altivec()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard
ce82dad7eb ppc: remove shift parameter from scalarproduct_int16_altivec()
The shift parameter was removed from this interface in 7e1ce6a.
This updates the Altivec implementation to match.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard
4c387c7070 ppc: dsputil: do unaligned block accesses correctly
To load unaligned vector data in the usual way, explicit vec_ld()
should be used rather than dereferencing a pointer to a vector type.
When the VSX extension is enabled, gcc may compile vector pointer
dereferences using the VSX lxvw4x instruction instead of the lvx
instruction typically used with Altivec/VMX.  As the behaviour of
these instructions with unaligned addresses differs, it is important
that only lvx is used here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Mans Rullgard
c75eca9d37 dvenc: do not call dsputil functions with stride not a multiple of 16
Allowing dsputil functions to assume the stride is a multiple of 16
even for smaller block sizes can simplify their implementation.
This appears to be the only place this guarantee is not met.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-01 00:21:30 +01:00
Hendrik Leppkes
85395ba73f avcodec: introduce YCoCg colorspace
Non perceptual color model that aims to have an increase effectiveness
in compression like the normal YCbCr while having near-lossless/lossless
mapping to RGB.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-04-29 14:00:34 -07:00
Luca Barbato
ccc2dfbcdf avcodec: cosmetic cleanup on header
Apply coding style to the structs.
2012-04-29 13:30:40 -07:00
Ronald S. Bultje
b12bf03275 aac sbr: align struct member by 32 byte.
Required because it's used in a call to imdct_half(), which is an AVX
function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-29 13:49:39 -04:00
Mans Rullgard
acb2c79c21 4xm: fix invalid array indexing
Indexing outside arrays is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-29 01:08:37 +01:00
Christophe GISQUET
7fb8b491e5 rv34dsp: factorize a multiplication in the noround inverse transform
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:16:07 -07:00
Christophe Gisquet
d834ab0f2a rv40: perform bitwise checks in loop filter
Down from 95 kcycles to 93 (including all called functions).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:12:38 -07:00
Ronald S. Bultje
774b681b80 rv34: remove inline keyword from rv34_decode_block().
Force-inlining increases object size by 8kB and causes a 2% slowdown.
2012-04-28 11:10:57 -07:00
Christophe Gisquet
0195ab5f5f rv40: change a logical test into a bitwise one.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:09:32 -07:00
Christophe Gisquet
8802799991 rv34: remove constant parameter
is_block2 was always 0, so just remove it, and change accordingly the code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:07:50 -07:00
Christophe Gisquet
34e1b07546 rv40: don't always do the full prev_type search
120->100 cycles.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:06:05 -07:00
Christophe GISQUET
e75d1d4f73 dsputil x86: revert a test back to its previous value
Commit 356ee8d caused the initial inversion.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 11:00:51 -07:00
Christophe Gisquet
fe5ed69dc7 rv34dsp x86: implement MMX2 inverse transform
141 cycles down to 51.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 10:58:47 -07:00
Roland Scheidegger
9b9df1cdff h264: new assembly version of get_cabac for x86_64 with PIC
This adds a hand-optimized assembly version for get_cabac much like the
existing one, but it works if the table offsets are RIP-relative.
Compared to the non-RIP-relative version this adds 2 lea instructions
and it needs one extra register. get_cabac() gets about 40% faster, for
an overall speedup of about 5%.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 09:43:25 -07:00
Roland Scheidegger
14e9ffc1e4 h264: use one table instead of several for cabac functions
The reason is this is easier for PIC code (in particular on darwin...).
Keep the old names as pointers (static in cabac_functions.h so gcc
knows these are just immediate offsets) so the c code can nicely stay the same
(alternatively could use offsets directly in the functions needing the
tables). This should produce the same code as before with non-pic and better
code (confirmed) with pic.

The assembly uses the new table but still won't work for PIC case.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 08:26:12 -07:00
Roland Scheidegger
444f47b55c h264: (trivial) remove unneeded macro argument in x86/cabac.h
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 08:24:56 -07:00
Jordi Ortiz
a7fa5ce671 libschroedingerdec: check malloc
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-28 15:11:18 +02:00
Mans Rullgard
0a07f2b346 dsputil: fix invalid array indexing
Indexing outside an array is invalid and causes errors with
gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-26 17:07:43 +01:00
Mans Rullgard
b6a6e90a7c fft-test: add option to set cpuflag mask
This can be useful for testing.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard
3d11c2d76d vp8: armv6: fix non-armv6t2 build
The assembler may fail to place literal pools close enough to
instructions referencing them.  An explicit .ltorg directive
fixes this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:16:31 +01:00
Mans Rullgard
e4ac031233 vp8: armv6 optimisations
Based on patch by Ronald S. Bultje <rsbultje@gmail.com>,
partially ported from libvpx.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Mans Rullgard
b692d246ea vp8: arm: separate ARMv6 functions from NEON
This is a preparation for complete ARMv6 optimisations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Mans Rullgard
dac78fd1d7 ARM: add some compatibility macros
This adds some macros simplifying Thumb and pre-v6T2 compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 21:41:39 +01:00
Diego Biurrun
a229d6c285 Remove libdirac decoder.
libschroedinger is the preferred way to decode Dirac video.
2012-04-23 09:20:24 +02:00
Mans Rullgard
d526c5338d ARM: allow runtime masking of CPU features
This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-22 12:30:45 +01:00
Mans Rullgard
d7458bc8c6 dsputil: remove unused functions
These functions were left unused by the lowres removal.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 20:00:39 +01:00
Mans Rullgard
2bcbd98459 Remove lowres video decoding
This feature is complex, of questionable utility, and slows down
normal decoding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 18:56:19 +01:00
Mans Rullgard
95510be8c3 avcodec: remove AVCodecContext.dsp_mask
This removes all references to AVCodecContext.dsp_mask and marks
it for eviction at the next version bump.  It has been superseded
by av_set_cpu_flag_mask() which, unlike this field, works everywhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 18:30:01 +01:00
Jan Ekström
b5c3f0b994 utvideo: general cosmetics
General cosmetics, such as keeping lines under 80 characters,
fixing a couple of typos (predition -> prediction) and a
general style fix that was pointed out by Derek when I was having
my sliced multithreading patch in review by him.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-20 18:37:34 -04:00
Alex Converse
7eacd70fea aac: Handle HE-AACv2 when sniffing a channel order. 2012-04-20 14:06:28 -07:00
Diego Biurrun
f973a85d4a xxan: Remove write-only variable in xan_decode_frame_type0().
libavcodec/xxan.c:293:13: warning: variable ‘corr_end’ set but not used
2012-04-20 21:08:35 +02:00
Diego Biurrun
b1563d0cf9 ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().
This simplifies the code a bit and avoids an uninitialized variable warning.
2012-04-20 21:08:34 +02:00
Justin Ruggles
b0e9edc44f avcodec: add a cook parser to get subpacket duration
Fixes jittery video playback of rm files with cook audio.
2012-04-20 12:11:20 -04:00
Diego Biurrun
2b98377935 dv: Initialize encoder tables during encoder init. 2012-04-19 14:35:22 +02:00
Diego Biurrun
f2e4465522 dv: Replace some magic numbers by the appropriate #define. 2012-04-19 10:43:32 +02:00
Diego Biurrun
0f53601ac6 ppc: drop unused function dct_quantize_altivec()
This also allows dropping some PPC-specific ugliness from dsputil.[ch].
2012-04-18 18:53:54 +02:00
Diego Biurrun
aa3f2cb584 mpegaudiodec: Do not discard mp_decode_frame() return value.
This fixes the warning:
libavcodec/mpegaudiodec.c:1704:14: warning: variable ‘out_size’ set but not used
2012-04-18 18:28:24 +02:00
Alex Converse
df8d5eaa14 avcodec_string: Favor AVCodecContext.codec over the default codec.
This improves output for formats with more than one AVCodec.
2012-04-17 14:51:23 -07:00
Alex Converse
b5d2bf964b cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow. 2012-04-17 14:51:23 -07:00
Reimar Döffinger
0f96f0d996 aacenc: Fix issues with huge values of bit_rate.
Do not pointlessly call ff_alloc_packet multiple times,
and fix an infinite loop by clamping the maximum
number of bits to target in the algorithm that does
not use lambda.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-17 10:25:28 -04:00
Diego Biurrun
db6e26d70c dv_tablegen: Drop unnecessary av_unused attribute from dv_vlc_map_tableinit(). 2012-04-17 13:36:43 +02:00
Kostya Shishkov
83632cbb11 proresenc: multithreaded quantiser search 2012-04-17 07:43:59 +02:00
Alex Converse
9fb7e14635 aacdec: More robust output configuration.
Save the old output configuration (if it has been used
successfully) when trying a new configuration. If the new configuration
fails to decode, restore the last successful configuration.
2012-04-16 14:09:52 -07:00
Carl Eugen Hoyos
af2f655c02 faac: Fix multi-channel ordering
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-04-16 14:09:52 -07:00
Alex Converse
ca332b1d8c faac: Add .channel_layouts 2012-04-16 14:09:51 -07:00
Mans Rullgard
8b84e082ed indeo3: add parens around some macro arguments
Without these, the expansion contains things like --1 with
some compilers resulting in build errors.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-16 16:09:08 +01:00
Ronald S. Bultje
87a246341b h264: use proper PROLOGUE statement for a function using 8 registers.
Fixes crashes when using biweight on win64.
2012-04-16 08:07:21 -07:00
Diego Biurrun
a3dbd459ff dv: Merge dvquant.h into dvdata.c where all other DV tables reside. 2012-04-16 10:04:57 +02:00
Diego Biurrun
05afc5f57d dv: Move static tables only used in one place to where they are used. 2012-04-16 10:04:56 +02:00
Derek Buitenhuis
5096399df2 utvideo: Remove unused variable 'src_size'
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-15 00:18:28 -04:00
Diego Biurrun
219a9ed19e libxvid: Reorder functions to avoid forward declarations; make functions static. 2012-04-14 17:45:38 +02:00
Diego Biurrun
7a0cb74fee libxvid: drop some pointless dead code 2012-04-14 17:45:38 +02:00
Mashiat Sarker Shakkhar
dac79c2737 wmal: vertical alignment cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:02:25 +02:00
Mashiat Sarker Shakkhar
2e13f57993 wmal: Warn about missing bitstream splicing feature and ask for sample.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:02:24 +02:00
Mashiat Sarker Shakkhar
9900dd2d9c wmal: Skip seekable_frame_in_packet.
There is no point in storing the value in a variable, since it is not
used anywhere else in the decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:02:22 +02:00
Mashiat Sarker Shakkhar
07933b44dd wmal: Drop unused variable num_possible_block_size.
This is probably a leftover from WMA Pro.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-14 16:01:23 +02:00
Mans Rullgard
f5be7958e3 qdm2: fix a dubious pointer cast
This reworks a loop to get rid of an ugly pointer cast,
fixing errors seen with the PathScale ENZO compiler.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-13 21:42:22 +01:00
Michael Niedermayer
680097cb6d WMAL: Do not try to read rawpcm coefficients if bits is invalid
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-13 23:13:03 +03:00
Alex Converse
f346b6bbeb tiffdec: K&R cosmetics 2012-04-13 12:58:19 -07:00
Ronald S. Bultje
b089ca871a dsputil: fix optimized emu_edge function on Win64.
Recent register allocation changes (x86inc.asm update) changed the
register order and thus opcodes for the inner loops. One of them became
>128bytes, which confuses other parts of this function where it jumps
to fixed-offset positions to extend the edge by fixed amounts. A simple
register change fixes this.
2012-04-13 11:28:30 -07:00
Alex Converse
90a4306007 tiffdec: Add a malloc check and refactor another. 2012-04-13 09:49:13 -07:00
Alex Converse
99a335299f faxcompr: Check malloc results and unify return path 2012-04-13 09:49:13 -07:00
Justin Ruggles
de7f22ab0c ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
Fixes ac3-encode and eac3-encode FATE test failures with SSE2 disabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:33:04 -07:00
Dale Curtis
97ae370078 pthread: Fix crash due to fctx->delaying not being cleared.
Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:32:01 -07:00
Dale Curtis
27c2fb0f72 vp3: Assert on invalid filter_limit values.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:31:55 -07:00
Ronald S. Bultje
76538d7a78 h264: fix 10bit biweight functions after recent x86inc.asm fixes.
This should have been updated in the x86inc.asm update, but was
accidently forgotten.
2012-04-12 21:13:57 -07:00
Alex Converse
2b8374e920 ffv1: Fix size mismatch in encode_line. 2012-04-12 18:34:45 -07:00
Diego Biurrun
18e8fef7c9 libxvid: remove disabled code 2012-04-12 13:10:38 +02:00
Mans Rullgard
9f3e781eab qdm2: make a table static const
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-12 10:59:23 +01:00
Mans Rullgard
9ffe8ee7c5 qdm2: simplify bitstream reader setup for some subpacket types
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-12 10:59:23 +01:00
Mans Rullgard
a31787ee3b qdm2: use get_bits_left()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-12 10:59:23 +01:00
Diego Biurrun
7bb3a302fe build: Consistently handle conditional compilation for all optimization OBJS. 2012-04-12 09:00:49 +02:00
Diego Biurrun
2ef15b46e4 avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics 2012-04-12 09:00:49 +02:00
Ronald Bultje
992f71e95d msrle: convert MS RLE decoding function to bytestream2.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-11 16:30:41 -04:00
Henrik Gramner
729f90e268 x86inc improvements for 64-bit
Add support for all x86-64 registers
Prefer caller-saved register over callee-saved on WIN64
Support up to 15 function arguments

Also (by Ronald S. Bultje)
Fix up our asm to work with new x86inc.asm.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-11 15:47:00 -04:00
Diego Biurrun
9676d8eb67 interplayvideo: fix av_dlog parameter type mismatch
libavcodec/interplayvideo.c:909:13: warning: format ‘%p’ expects argument of type ‘void *’, but argument 7 has type ‘GetByteContext’ [-Wformat]
2012-04-11 10:43:47 +02:00
Diego Biurrun
679481b3b6 Drop some pointless #ifdefs.
The files are only compiled if the #ifdef conditions are met.
2012-04-10 19:27:38 +02:00
Christophe GISQUET
2130bd8f5b rv40dsp x86: use only one register, for both increment and loop counter
Around 10 cycles faster for luma.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-10 10:07:09 -07:00
Christophe GISQUET
272b252c01 rv40dsp: implement prescaled versions for biweight.
Quite often, the original weights are multiple of 512. By prescaling them
by 1/512 when they are computed (once per frame), no intermediate shifting
is needed, and no prescaling on each call either.

The x86 code already used that trick.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-10 10:06:48 -07:00
Sebastien Zwickert
a40ba3afe8 vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-10 15:50:56 +03:00
Anton Khirnov
7c59b5c2a5 lavc doxy: add all installed headers to doxy groups. 2012-04-09 21:25:17 +02:00
Anton Khirnov
ec57b7de74 lavc doxy: add avfft to the main lavc group. 2012-04-09 21:24:46 +02:00
Anton Khirnov
8a74029ea2 lavc doxy: add remaining avcodec.h functions to a misc doxygen group. 2012-04-09 21:18:47 +02:00
Anton Khirnov
6aadfbda09 lavc doxy: add AVPicture functions to a doxy group. 2012-04-09 21:18:28 +02:00
Anton Khirnov
56512ce104 lavc doxy: add resampling functions to a doxy group. 2012-04-09 21:18:19 +02:00
Anton Khirnov
40ca0e6a75 lavc doxy: replace \ with /
It's the more proper symbol to use and it prevents doxygen from thinking
it's a command.
2012-04-09 21:16:37 +02:00
Anton Khirnov
f038515f0a lavc doxy: add encoding functions to a doxy group. 2012-04-09 21:16:24 +02:00
Anton Khirnov
c8ef8464c2 lavc doxy: add decoding functions to a doxy group. 2012-04-09 21:14:05 +02:00
Anton Khirnov
199ada4944 lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO} 2012-04-09 21:13:49 +02:00
Anton Khirnov
30f3f62563 lavc doxy: add AVPacket-related stuff to a separate doxy group.
Also move AV_PKT_DATA_PARAM_CHANGE/AV_PKT_DATA_H263_MB_INFO to the
proper place.
2012-04-09 21:13:17 +02:00
Anton Khirnov
294b3a5074 lavc doxy: add core functions/definitions to a doxy group. 2012-04-09 21:12:53 +02:00
Diego Biurrun
02c39f056a ppc: Add/remove a number of const qualifiers to fix related warnings. 2012-04-09 20:39:33 +02:00
Justin Ruggles
c58846f3a8 avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
Use default alignment in audio_get_buffer()
2012-04-09 10:20:35 -04:00
Justin Ruggles
1337de0c4b avcodec: validate the channel layout vs. channel count for decoders
Set avctx->channel_layout to 0 if the channel count does not match
avctx->channels.
2012-04-08 18:45:58 -04:00
Gwenole Beauchesne
58e1032d8f vaapi: mpeg2: fix slice_vertical_position calculation.
VASliceParameterBufferMPEG2.slice_vertical_position shall express
the slice vertical position from the original bitstream. The HW
decoder will correctly decode to the right line computed from the
appropriate top_field_first and is_first_field flags.

This patch aligns with DXVA's definition, which is what most HW and
drivers expect. In particular, Intel PowerVR (Cedarview et al.) and
NVIDIA (through VA-to-VDPAU layer). Since it looks more complex to fix
binary drivers, I aligned the Intel Gen driver (Sandy Bridge et al.)
to this behaviour, while maintaining compatibility with codec layers
not providing this patch yet.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 13:10:20 +03:00
Gwenole Beauchesne
9cb150c9ab hwaccel: mpeg2: decode first field, if requested.
If user opted to present fields as they come, then the first field
picture needs to be submitted to the HW for decoding. In particular,
this fixes MPEG-2 decoding of interlaced streams.

Tested on Intel Cedar Trail, Sandy Bridge and Ivy Bridge platforms.
Someone reported on the ffmpeg-devel@ list this also works on DXVA
(Windows) and other Linux platforms (NVIDIA, through the VA wrapper).

This also means a similar patch to non-hwaccel VDPAU may be necessary.

Note: I believe the SLICE_FLAG_ALLOW_FIELD is useless since the first
field shall always be submitted to the HW anyway. Nobody uses HW accels
(dxva, vaapi, vdpau, etc.) without that flag though.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 13:08:52 +03:00
Martin Storsjö
1428527581 cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-07 00:02:19 +03:00
Martin Storsjö
00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Martin Storsjö
6d27d8b1dd cosmetics: Convert mimic.c to utf-8
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 21:35:26 +03:00
Reimar Döffinger
439c3d5bcc nellymoserenc: fix crash due to memsetting the wrong area.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 21:05:19 +03:00
Anne Aaron
fdf3a749d3 mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 18:32:17 +03:00
Justin Ruggles
bb0618e68b avcodec: remove avcodec_guess_channel_layout()
It is not public because the header is not installed, and its functionality
has been replaced by av_get_default_channel_layout().
2012-04-05 16:40:51 -04:00
Justin Ruggles
5cc51a5847 avutil: Add av_get_default_channel_layout()
Also, use the new function in the AC-3 encoder.
2012-04-05 16:35:14 -04:00
Diego Biurrun
0becb07842 h264: Factorize declaration of mb_sizes array. 2012-04-05 17:17:22 +02:00
Christophe GISQUET
6b81da2fd0 dsputil x86: use SSE float instruction instead of SSE2 integer equivalent
All the more required since the users are pure SSE functions.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-04 11:24:27 -07:00
Christophe GISQUET
cd88105f6f dsputil x86: remove deprecated parameter from scalarproduct_int16 prototype
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-04 11:24:08 -07:00
Christophe GISQUET
f9888520cc vp8dsp x86: perform rounding shift with a single instruction
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-04 11:23:36 -07:00
Diego Biurrun
e484265c97 aacenc: Mark deinterleave_input_samples argument as const.
This fixes the warning:
libavcodec/aacenc.c:524: warning: passing argument 2 of ‘deinterleave_input_samples’ discards qualifiers from pointer target type
2012-04-04 19:34:40 +02:00
Anton Mitrofanov
14af74e9a0 h264: fix 4:2:2 PCM-macroblocks decoding
Fixes bug 239.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-04 19:34:39 +02:00
Derek Buitenhuis
91dffb4c1d w32threads: Make pthread_cond_wait follow POSIX
pthread_cond_wait is supposed to return an integer,
and indeed does sometimes. Fix its function declaration
to match its behavior and POSIX.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-04 13:04:38 -04:00
Diego Biurrun
3dde147ff9 cosmetics: Consistently place static, inline and av_cold attributes/keywords. 2012-04-04 14:54:13 +02:00
Diego Biurrun
d4f05ae3b6 sbrdsp: Use standard multiple inclusion guards. 2012-04-04 14:54:11 +02:00
Aneesh Dogra
6d21f49879 pcm: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-04 14:14:28 +02:00
Piotr Bandurski
835a893bcb rawdec: Support fourccs YV16 and YV24 2012-04-03 15:48:53 -04:00
Michael Niedermayer
420d1df2e2 apedec: check bits <= 32.
Fixes a floating-point exception further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-03-31 14:01:12 -04:00
Aneesh Dogra
c265b77b11 cavs: Remove unused code.
The square is always passed as 1 whenever the function is called and
thus the if block never gets executed.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-31 08:14:54 -07:00
Justin Ruggles
67aec401d8 libspeexdec: set frame size in libspeex_decode_init()
This fixes speex decoding, which was broken in 85469f1c.
2012-03-30 16:30:37 -04:00
Franz Brauße
12cbbbb4ab smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 14:44:11 -04:00
Diego Biurrun
b691fd7a4d h264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing() 2012-03-30 17:47:12 +02:00
Diego Biurrun
9ad80ef3db h264: Make ff_h264_decode_end() static, it is not used externally.
Also drop the now unnecessary ff_ prefix from its name.
2012-03-30 17:46:52 +02:00
Ronald S. Bultje
0399fe0fd2 lzw: fix potential integer overflow. 2012-03-29 11:36:14 -07:00
Ronald S. Bultje
b7b1509d06 truemotion: forbid invalid VLC bitsizes and token values.
SHOW_UBITS() is only defined up to n_bits is 25, therefore forbid
values larger than this in get_vlc2() (max_bits). tokens[][] can be
used as an index in deltas[], which has a size of 64, so ensure the
values are smaller than that.

This prevents crashes on corrupt bitstreams.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:14 -07:00
Ronald S. Bultje
bf39d3b59d truemotion2: handle out-of-frame motion vectors through edge extension.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:11 -07:00
Kostya Shishkov
a05c41acd1 mp3dec: perform I/S and M/S only when frame mode is joint stereo.
Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.
2012-03-29 19:08:05 +02:00
Ronald S. Bultje
ddcf67c8a5 lzw: prevent buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 17:38:51 -07:00
Mashiat Sarker Shakkhar
28e8c4d59a WMAL: Remove inaccurate and unnecessary doxy
A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-29 01:47:03 +02:00
Ronald S. Bultje
63a1b481f6 h264: fix cabac-on-stack after safe cabac reader. 2012-03-28 16:35:42 -07:00
Ronald S. Bultje
bd508d435b truemotion2: convert packet header reading to bytestream2.
Also use correct buffer sizes in calls to tm2_read_stream(). Together,
this prevents overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 12:29:26 -07:00
Ronald S. Bultje
a940198130 cabac: add overread protection to BRANCHLESS_GET_CABAC().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-03-28 08:01:29 -07:00
Ronald S. Bultje
448dc42571 cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). 2012-03-28 08:01:29 -07:00