Justin Ruggles
81c9e2e6d0
alac: split element parsing into a separate function
...
This will make multi-channel implementation simpler.
Based partially on a patch by Andrew D'Addesio <modchipv12@gmail.com>.
2012-07-19 13:26:48 -04:00
Justin Ruggles
cd632619d9
alac: support a read sample size of up to 32
...
Use get_bits_long() in decode_scalar().
Use unsigned int for decoded value.
2012-07-19 13:26:48 -04:00
Justin Ruggles
73dc0db486
alac: output in planar sample format
...
Avoids unneeded interleaving and allows for reusing the AVFrame output buffer
as the internal buffer for 24-bit and 32-bit sample size.
2012-07-19 13:26:48 -04:00
Justin Ruggles
6482bd8831
alac: add 32-bit decoding support
2012-07-19 13:26:48 -04:00
Andrew D'Addesio
6cda74c155
alac: simplify channel interleaving
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-07-19 13:26:48 -04:00
Justin Ruggles
5138ff143f
alac: use AVPacket fields directly in alac_decode_frame()
2012-07-19 13:26:47 -04:00
Justin Ruggles
7a206eb32f
alac: fix check for valid max_samples_per_frame
2012-07-19 13:26:47 -04:00
Justin Ruggles
1193d3fedd
alac: use get_sbits() to read LPC coefficients instead of casting
2012-07-19 13:26:47 -04:00
Justin Ruggles
7a50ec6799
alac: move the current samples per frame to the ALACContext
...
This will simplify the multi-channel implementation.
2012-07-19 13:26:47 -04:00
Justin Ruggles
46043962ea
alac: avoid using a double-negative when checking if the frame is compressed
2012-07-19 13:26:47 -04:00
Justin Ruggles
9a6c528e08
alac: factor out output_size check in predictor_decompress_fir_adapt()
2012-07-19 13:26:47 -04:00
Justin Ruggles
ebd4c3add1
alac: factor out loading of next decoded sample in LPC prediction
2012-07-19 13:26:47 -04:00
Justin Ruggles
a4ecd41442
alac: use index into buffer_out instead of incrementing the pointer
2012-07-19 13:26:47 -04:00
Justin Ruggles
f2515cd629
alac: simplify lpc coefficient adaptation
2012-07-19 13:26:47 -04:00
Justin Ruggles
abc4376b31
alac: reduce the number of local variables needed in lpc prediction
2012-07-19 13:26:47 -04:00
Justin Ruggles
01880d287b
alac: simplify 1st order prediction and reading of warm-up samples
2012-07-19 13:26:46 -04:00
Justin Ruggles
d0c0bf0d3e
alac: cosmetics: reindent after last commit
2012-07-19 13:26:46 -04:00
Justin Ruggles
79def4c523
alac: remove unneeded conditionals in predictor_decompress_fir_adapt()
2012-07-19 13:26:46 -04:00
Justin Ruggles
4bcd637dcb
alac: use sizeof() instead of hardcoded data sizes
2012-07-19 13:26:46 -04:00
Justin Ruggles
91620a04f1
alac: make block_size signed
...
It does not need to be unsigned.
2012-07-19 13:26:46 -04:00
Justin Ruggles
2fc24b3273
alac: remove a duplicate local variable
2012-07-19 13:26:46 -04:00
Justin Ruggles
5177413d20
alac: conditionally set sign_modifier to 1
...
It is already unconditionally set to 0 prior to this, so we can modify it
only when needed.
2012-07-19 13:26:46 -04:00
Justin Ruggles
7e6593e977
alac: eliminate 2 unneeded local variables in bastardized_rice_decompress()
...
x_modified is just unnecessary, and final_val can be removed by simplifying
the unsigned-to-signed conversion.
2012-07-19 13:26:46 -04:00
Justin Ruggles
6fd8a28b59
alac: adjust conditions for updating entropy decoder history
...
avoids some unnecessary arithmetic in certain situations
2012-07-19 13:26:46 -04:00
Justin Ruggles
a06fdadd97
alac: cosmetics: reindent after last commit
2012-07-19 13:26:46 -04:00
Justin Ruggles
d9837434a9
alac: limit the rice param before passing to decode_scalar()
...
reduces the number of parameters to decode_scalar() and slightly simplifies
the code
2012-07-19 13:26:45 -04:00
Justin Ruggles
6e91f62256
alac: reduce the number of parameters to bastardized_rice_decompress()
...
Use the ALACContext fields directly instead.
2012-07-19 13:26:45 -04:00
Justin Ruggles
836e8b9ba0
alac: cosmetics: rename some ALACContext parameters
2012-07-19 13:26:45 -04:00
Justin Ruggles
2ac1737583
alac: clean up and update comments leftover from reverse-engineering
2012-07-19 13:26:45 -04:00
Mans Rullgard
bf1cf4d5a5
flacdec: reverse lpc coeff order, simplify filter
...
Reversing the lpc coefficient order simplifies indexing in
the filter.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-19 10:21:32 +01:00
Diego Biurrun
9f97af2688
x86: dsputil: drop some unused CPU flag debug code
2012-07-19 10:17:56 +02:00
Mans Rullgard
ffdd93a25e
ppc: fix build with altivec disabled
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-18 13:34:42 +01:00
Mans Rullgard
28f9ab7029
vp3: move idct and loop filter pointers to new vp3dsp context
...
This moves all VP3-specific function pointers from dsputil to a
new vp3dsp context. There is no reason to ever use the VP3 IDCT
where an MPEG2 IDCT is expected or vice versa.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-18 10:32:19 +01:00
Mans Rullgard
ab9f987661
build: add CONFIG_VP3DSP, reduce repetition in OBJS lists
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-18 10:32:18 +01:00
Kostya Shishkov
4cfb0d871d
tscc2: do not add/subtract 128 bias during DCT
...
It turns out that the reference decoder subtracts 128 from DC during block
decode but adds it back during reordering block with zigzag pattern.
Transforming block with incorrect DC caused heavy visual artifacts for
many quantisers.
2012-07-18 07:05:59 +02:00
Kostya Shishkov
3c6c19184c
tscc2: fix typo in DCT
2012-07-18 07:05:53 +02:00
Michael Bradshaw
453c02f971
libopenjpeg: introduce encoding support
...
Based on FFmpeg version from
commit 713a7854e0
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-17 14:56:58 +02:00
Michael Bradshaw
b43a7bb4f9
libopenjpeg: rename decoder source file.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-17 14:56:22 +02:00
Kostya Shishkov
0b40153d20
tscc2: DCT output should not be clipped
...
This fixes decoding some TSCC2 files with large quantisers.
2012-07-17 07:21:24 +02:00
Mohammad Alsaleh
c37c383e59
libfdk-aac: Check if cutoff value is valid
...
Passing a cutoff value < sample_rate/256 will cause a crash.
Also, values >20000 will have no effect and 20000 will be used anyway.
Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-15 21:59:51 +03:00
Mashiat Sarker Shakkhar
082829520e
vc1dec: Do not use random pred_flag if motion vector data is skipped
...
This fixes SA10143.vc1 from test-suite. Also partially fixes MC-VC1.ts
from videolan streams archive.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-15 14:02:38 +03:00
Martin Storsjö
25f056e6d4
vp8: Enclose pthread function calls in ifdefs
...
This fixes building with threads disabled.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-15 13:55:18 +03:00
Ronald S. Bultje
c44091a9f7
snow: refactor code to work around a compiler bug in MSVC.
...
This fixes the compiler error "cannot convert from 'BlockNode' to
'int16_t'".
2012-07-14 19:19:34 -07:00
Martin Storsjö
a794600c00
vp8: Include the thread headers before using the pthread types
...
This was unnoticed on linux, since stdlib.h apparently includes
files declaring the pthread_mutex_t and pthread_cond_t types.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-14 19:19:33 -07:00
Daniel Kang
951455c1c1
vp8: implement sliced threading
...
Testing gives 25-30% gain on HD clips with two threads and
up to 50% gain with eight threads.
Sliced threading uses more memory than single or frame threading.
Frame threading and single threading keep the previous memory
layout.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-14 20:18:54 +02:00
Daniel Kang
17343e3952
vp8: move data from VP8Context->VP8Macroblock
...
In preparation for sliced threading.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-14 20:18:54 +02:00
Daniel Kang
337ade52de
vp8: refactor decoding a single mb_row
...
This is in preperation for sliced threading.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-14 20:18:54 +02:00
Janne Grunau
f30260d32a
imgconvert: deprecate avcodec_find_best_pix_fmt()
2012-07-13 19:22:46 +02:00
Janne Grunau
ac29054fda
imgconvert: add avcodec_find_best_pix_fmt2()
...
The number of pixel formats outgrew the number of available bits in
the bitmask used in avcodec_find_best_pix_fmt().
avcodec_find_best_pix_fmt2() uses a PIX_FMT_NONE terminated list
of pixel formats instead.
2012-07-13 19:22:46 +02:00
Janne Grunau
39bb27bf79
imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt
...
CC: libav-stable@libav.org
2012-07-13 17:29:27 +02:00