libschroedingerdec: check malloc

Signed-off-by: Diego Biurrun <diego@biurrun.de>
h264: (trivial) remove unneeded macro argument in x86/cabac.h

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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>
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>
rv34dsp x86: implement MMX2 inverse transform

141 cycles down to 51.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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>
rv40: don't always do the full prev_type search

120->100 cycles.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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>
rv40: change a logical test into a bitwise one.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
rv34: remove inline keyword from rv34_decode_block().

Force-inlining increases object size by 8kB and causes a 2% slowdown.
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>
rv34dsp: factorize a multiplication in the noround inverse transform

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
4xm: fix invalid array indexing

Indexing outside arrays is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
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>
avcodec: cosmetic cleanup on header

Apply coding style to the structs.
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>
mkv: forward EMBL block data error

Do not return 0 on error.
mkv: mark corrupted packets and return them

Do return error if memory allocation or I/O fails.
APIchanges: fill in some dates and commit hashes
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>