Kostya Shishkov
d073f122ea
imc: some cosmetics
2012-05-25 20:18:02 +02:00
Michael Niedermayer
90290a5150
tqi: Pass errors from the MB decoder
...
This silences some valgrind warnings.
CC: libav-stable@libav.org
Fixes second half of http://ffmpeg.org/trac/ffmpeg/ticket/794
Bug found by: Oana Stratulat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit f85334f58e
)
2012-05-23 20:42:46 +02:00
Justin Ruggles
713548cbad
x86: lavc: use %if HAVE_AVX guards around AVX functions in yasm code.
...
This is needed for older versions of yasm/nasm that do not support AVX.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-22 20:46:02 +02:00
Diego Biurrun
cc7fac9970
dwt: return errors from ff_slice_buffer_init()
2012-05-22 14:01:56 +02:00
Jordi Ortiz
c89e428ed8
dwt: check malloc calls
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-22 13:27:06 +02:00
Diego Biurrun
3ea5429489
ppc: Drop unused header regs.h
2012-05-22 11:54:53 +02:00
Kieran Kunhya
5ff01259a8
Convert vector_fmul range of functions to YASM and add AVX versions
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-21 17:13:05 -04:00
Jordi Ortiz
13a867a63e
dwt: K&R prettyprinting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-21 11:14:49 +02:00
Diego Biurrun
4f04f5cc8b
indeo: Make ivi_calc_band_checksum() static, it is only used in one file.
2012-05-20 15:59:30 +02:00
Diego Biurrun
9ccbdc0aca
indeo: Drop unused debug function ivi_check_band().
2012-05-20 15:56:25 +02:00
Diego Biurrun
0c517644b2
avcodec/utils: cast a function argument to shut up a compiler warning
...
libavcodec/utils.c:251: note: expected ‘const uint8_t *’ but argument is of type ‘const short int *’
2012-05-20 15:09:07 +02:00
Diego Biurrun
4466d0e84b
truemotion1: remove disabled code
2012-05-20 15:04:43 +02:00
Kostya Shishkov
f05b69a79f
fix typo in comment
2012-05-20 14:15:14 +02:00
Kostya Shishkov
cf61aaaca1
indeo: check for invalid motion vectors
2012-05-20 11:19:48 +02:00
Kostya Shishkov
9603738221
indeo: check that band output buffer exists
2012-05-20 11:19:48 +02:00
Kostya Shishkov
23ba1503f2
indeo: clear allocated band buffers
2012-05-20 11:19:48 +02:00
Kostya Shishkov
a6e4ac40a6
indeo: track tile macroblock size
2012-05-20 11:19:48 +02:00
Kostya Shishkov
fe7a37c36f
indeo: check custom Huffman tables for errors
2012-05-20 11:19:47 +02:00
Kostya Shishkov
aa372cf470
factor out common decoding code for Indeo 4 and Indeo 5
2012-05-20 11:19:30 +02:00
Kostya Shishkov
b37d945dd4
mp3: fix start band index for block type 2 in 8kHz audio
...
In hybrid frames long window part ends at 36 samples for most of the cases
but at 72 for 8kHz case. For some reason decoder assumed it's 48 or even 36
samples, which caused wrong bitstream decoding for such blocks.
l3_25207.mpg from conformance suite demonstrates it the best.
2012-05-20 10:53:21 +02:00
Mans Rullgard
7d7b40f48a
pcmenc: set correct bitrate value
...
This fixes a bogus bitrate value in the header of WAV files with
alaw/ulaw audio.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-17 02:34:57 +01:00
Michael Kostylev
6797d1948b
x86: rv40: Mark rv40_weight functions as MMX2; they use MMX2 instructions.
2012-05-15 23:54:08 +02:00
Justin Ruggles
95a98ab3f0
ac3dsp: simplify x86 versions of ac3_max_msb_abs_int16
...
Simplifies the code by using cpuflags and a new macro.
Also fixes the invalid use of the MMX2 pshufw operation in the MMX-only
function.
2012-05-15 15:23:59 -04:00
Aneesh Dogra
46ea46357a
tta: Fix comment about channel number; TTA supports >2 channels.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-15 19:10:46 +02:00
Kostya Shishkov
6de226a2b8
indeo3: validate new frame size before resetting decoder
2012-05-15 19:05:39 +02:00
Kostya Shishkov
bc00da2701
indeo3: when freeing buffers, set pointers referencing them to NULL as well
2012-05-15 19:05:39 +02:00
Kostya Shishkov
81064a8045
indeo3: initialise pixel planes on allocation
...
This prevents decoder from reading garbage from it in case of errors later.
2012-05-15 19:05:39 +02:00
Kostya Shishkov
fc417db3f1
indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
2012-05-15 19:05:39 +02:00
Anton Khirnov
e6694659fc
libmp3lame: set supported channel layouts.
2012-05-14 21:36:11 +02:00
Diego Biurrun
100c70b048
vcr1: Add vcr1_ prefixes to all static functions with generic names.
2012-05-14 16:19:16 +02:00
Diego Biurrun
a761e5951c
vcr1: Fix return type of common_init to match the function pointer signature.
...
libavcodec/vcr1.c:182: warning: initialization from incompatible pointer type
2012-05-14 16:19:16 +02:00
Diego Biurrun
55da88c5ab
vcr1enc: Replace obsolete get_bit_count by put_bits_count/flush_put_bits.
2012-05-14 16:19:14 +02:00
Diego Biurrun
5aad8e80a7
motion-test: remove disabled code
2012-05-14 15:38:43 +02:00
Vitor Sessak
fcc456b829
x86: use more standard construct for setting ASM functions in FFT code
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-14 15:38:42 +02:00
Michael Kostylev
ea60dfe284
x86: vc1: drop MMX loop filter implementation, which uses MMX2 instructions.
2012-05-12 14:02:45 +02:00
Mans Rullgard
e54e6f25cf
arm/neon: dsputil: use correct size specifiers on vld1/vst1
...
Change the size specifiers to match the actual element sizes
of the data. This makes no practical difference with strict
alignment checking disabled (the default) other than somewhat
documenting the code. With strict alignment checking on, it
avoids trapping the unaligned loads.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-10 22:56:37 +01:00
Mans Rullgard
2eba6898c9
arm: dsputil: prettify some conditional instructions in put_pixels macros
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-10 22:56:09 +01:00
Mans Rullgard
c776531aef
vqavideo: change x/y loop counters to the usual pattern
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-10 22:55:42 +01:00
Christophe Gisquet
110d0cdc9d
rv40dsp x86: MMX/MMX2/3DNow/SSE2/SSSE3 implementations of MC
...
Code mostly inspired by vp8's MC, however:
- its MMX2 horizontal filter is worse because it can't take advantage of
the coefficient redundancy
- that same coefficient redundancy allows better code for non-SSSE3 versions
Benchmark (rounded to tens of unit):
V8x8 H8x8 2D8x8 V16x16 H16x16 2D16x16
C 445 358 985 1785 1559 3280
MMX* 219 271 478 714 929 1443
SSE2 131 158 294 425 515 892
SSSE3 120 122 248 387 390 763
End result is overall around a 15% speedup for SSSE3 version (on 6 sequences);
all loop filter functions now take around 55% of decoding time, while luma MC
dsp functions are around 6%, chroma ones are 1.3% and biweight around 2.3%.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-10 18:42:43 +02:00
Christophe Gisquet
706b998cdc
ape: Use unsigned integer maths
...
This involves a division that should be a shift.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-10 16:40:43 +02:00
Mans Rullgard
cbc7d60afa
arm: dsputil: fix overreads in put/avg_pixels functions
...
The vertically interpolating variants of these functions read
ahead one line to optimise the loop. On the last line processed,
this might be outside the buffer. Fix these invalid reads by
processing the last line outside the loop.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-10 14:39:34 +01:00
Diego Biurrun
1de53d006b
h264: K&R formatting cosmetics for header files (part II/II)
2012-05-10 13:13:44 +02:00
Diego Biurrun
be545b8a34
h264: K&R formatting cosmetics for header files (part I/II)
2012-05-10 13:02:47 +02:00
Diego Biurrun
8ae1914327
vcr1enc: drop pointless empty encode_init() wrapper function
2012-05-09 23:47:37 +02:00
Diego Biurrun
eeeefd5001
vcr1: drop pointless write-only AVCodecContext member from VCR1Context
2012-05-09 23:24:07 +02:00
Diego Biurrun
51c4d87093
vcr1: group encoder code together to save #ifdefs
2012-05-09 23:24:07 +02:00
Diego Biurrun
db1e403cfb
vcr1: cosmetics: K&R prettyprinting, typos, parentheses, dead code, comments
2012-05-09 23:24:06 +02:00
Diego Biurrun
c8b4a3999b
libxvid: Give more suitable names to libxvid-related files.
2012-05-09 18:18:05 +02:00
Diego Biurrun
5b432d66ce
libxvid: Separate libxvid encoder from libxvid rate control code.
...
This allows compiling the Xvid rate control code without the encoder.
2012-05-09 18:18:05 +02:00
Diego Biurrun
727af82a84
jpeglsdec: Remove write-only variable in ff_jpegls_decode_lse().
...
libavcodec/jpeglsdec.c:54:9: warning: variable ‘len’ set but not used
2012-05-09 18:12:28 +02:00
Anton Khirnov
c22953b8a3
lavc: check that extended_data is properly set in avcodec_encode_audio2().
2012-05-09 17:47:11 +02:00
Anton Khirnov
a5117a2444
lavc: pad last audio frame with silence when needed.
2012-05-09 17:46:54 +02:00
Jordi Ortiz
38f06a1415
libschroedingerdec: Change AVPicture to AVFrame and use SchroTag to store pts
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-05-08 16:06:49 -07:00
Alex Converse
40f81769ae
options_table: Add some missing #includes to fix "make checkheaders".
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-08 20:05:20 +02:00
Kostya Shishkov
464e9ab011
lagarith: add YUY2 decoding support
...
Unlike other variants, for YUY2 we need to use different prediction:
* on line 0 for luma we should left predict starting from the second pixel
* on line 1 we should left predict first 4 pixels for luma and 2 for chroma
* median prediction employed here is taken directly from HuffYUV
2012-05-08 07:24:31 +02:00
Carl Eugen Hoyos
58637a0b24
Support decoding unaligned rgb24 lagarith.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-08 07:23:44 +02:00
Diego Biurrun
520c1ec699
dv: Split profile handling code into a separate file.
2012-05-07 23:59:49 +02:00
Ronald S. Bultje
64953f67f9
qdm2: clip array indices returned by qdm2_get_vlc().
...
Prevents subsequent overreads when these numbers are used as indices
in arrays.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-07 13:08:36 -04:00
Justin Ruggles
f132248028
avcodec: do not needlessly set packet size to 0 in avcodec_encode_audio2()
...
It is already set to 0 by av_free_packet()
2012-05-07 12:14:05 -04:00
Justin Ruggles
74e10b6204
avcodec: for audio encoding, reset output packet when it is not valid
2012-05-07 12:14:05 -04:00
Justin Ruggles
fa0319b4fd
avcodec: refactor avcodec_encode_audio2() to merge common branches
2012-05-07 12:14:05 -04:00
Justin Ruggles
b461cd4deb
avcodec: remove fallbacks for AVCodec.encode() in avcodec_encode_audio2()
...
We no longer have any audio encoders using AVCodec.encode().
2012-05-07 12:14:04 -04:00
Diego Biurrun
fdc918632f
libschroedinger: Switch to function names more in line with Libav style.
2012-05-07 14:31:59 +02:00
Diego Biurrun
9cef0669c4
Move code shared between libdirac and libschroedinger to libschroedinger.
...
This also involves making some function static and changing the name
prefixes of some functions and structures.
2012-05-07 14:31:59 +02:00
Diego Biurrun
10d2ea2604
h264: Remove a commented-out function pointer typedef.
2012-05-07 14:17:43 +02:00
Diego Biurrun
ea14050642
txd: Remove write-only variable in txd_decode_frame().
...
libavcodec/txd.c:49:60: warning: variable ‘mipmap_count’ set but not used
2012-05-07 14:17:42 +02:00
Diego Biurrun
246b050f51
mmvideo.c: Remove unused variable in mm_decode_pal().
...
libavcodec/mmvideo.c:87:9: warning: variable ‘i’ set but not used
2012-05-07 14:17:41 +02:00
Diego Biurrun
dbe6ba55a3
build: cosmetics: Add missing end-of-line backslashes to item lists.
2012-05-07 14:17:40 +02:00
Diego Biurrun
9eb83a56aa
build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line.
2012-05-07 14:01:32 +02:00
Diego Biurrun
1f4f752117
libschroedinger: Move a function to avoid a forward declaration.
2012-05-07 10:35:25 +02:00
Sean McGovern
b68c4ac293
pthread: warn on high thread counts
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-07 10:35:01 +02:00
Anton Khirnov
828bd088f3
lavc: add sample rate and channel layout to AVFrame.
...
Rationale is the same as for video width/height etc.
2012-05-07 07:08:03 +02:00
Paul B Mahol
37f4a976b3
zerocodec: check if the previous frame is missing
...
ZeroCodec relies on the keyframe flag being set in the container, and
prev is the previously decoded frame. A keyframe flags incorrectly set
will lead to this condition.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-05-06 15:47:10 -07:00
Kostya Shishkov
fb5c1aaea6
dfa: use more meaningful return codes
2012-05-06 19:18:27 +02:00
Michael Niedermayer
71a3c59ed7
eatgv: check vector_bits
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-06 19:18:02 +02:00
Kostya Shishkov
a390aa0ea4
eatgv: check motion vectors
2012-05-06 19:17:32 +02:00
Diego Biurrun
30b1961c66
Mark a number of variables only used in av_dlog() calls as av_unused.
...
This fixes a number of unused-but-set gcc warnings.
2012-05-06 18:01:31 +02:00
Diego Biurrun
b2e92e946c
dvdec: drop const qualifier from variable to eliminate a warning
...
libavcodec/dvdec.c:344:12: warning: assignment discards ‘const’ qualifier from pointer target type
2012-05-06 18:01:30 +02:00
Robert Nagy
ad0278661b
avcodec: Improve comment for thread_safe_callbacks to avoid misinterpretation.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-06 18:00:29 +02:00
Kostya Shishkov
1fdb5649d9
lagarith: make offset array type unsigned
...
This is logical and also fixes checking for the fourth plane offset.
2012-05-06 09:32:08 +02:00
Kostya Shishkov
8099187e89
dfa: add some checks to ensure that decoder won't write past frame end
2012-05-06 09:31:52 +02:00
Mans Rullgard
96f7590efd
aacps: NEON optimisations
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-05 22:04:21 +01:00
Mans Rullgard
47d18d5354
aacps: align some arrays
...
This is required for SIMD optimisations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-05 22:04:21 +01:00
Mans Rullgard
bf1945af30
aacps: move some loops to function pointers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-05 22:04:21 +01:00
Jakub Stachowski
ddffe3de43
WMAL: Shift output samples by the specified number of padding zeroes.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-05 12:38:54 +02:00
Mashiat Sarker Shakkhar
363c3a44ff
WMAL: Restore removed code in mclms_predict()
...
Based on observations made by Jakub Stachowski <qbast@go2.pl>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-05-05 12:38:37 +02:00
Ronald S. Bultje
d2205d6543
png: check bit depth for PAL8/Y400A pixel formats.
...
Wrong bit depth can lead to invalid rowsize values, which crashes the
decoder further down.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-05-04 16:06:47 -07:00
Alex Converse
37ddd38332
celp filters: Do not read earlier than the start of the 'out' vector.
...
CC: libav-stable@libav.org
2012-05-04 10:55:31 -07:00
Mans Rullgard
58b2e0f0f2
vqavideo: return error if image size is not a multiple of block size
...
The decoder assumes in various places that the image size
is a multiple of the block size, and there is no obvious
way to support odd sizes. Bailing out early if the header
specifies a bad size avoids various errors later on.
Fixes CVE-2012-0947.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-03 21:40:19 +01:00
Hendrik Leppkes
1d4a01474d
mpeg12: fixed parsing in some mpeg2 streams
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-05-03 12:15:52 -04:00
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
Ronald S. Bultje
16f6e83f74
cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
2012-03-28 08:01:29 -07:00
Ronald S. Bultje
951014e5bb
cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
2012-03-28 08:01:29 -07:00
Ronald S. Bultje
a0bdcb019e
h264: add overread protection to get_cabac_bypass_sign_x86().
2012-03-28 08:01:29 -07:00
Ronald S. Bultje
95bfa4ead7
h264: reindent get_cabac_bypass_sign_x86().
2012-03-28 08:01:29 -07:00
Ronald S. Bultje
db025929f2
h264: use struct offsets in get_cabac_bypass_sign_x86().
2012-03-28 08:01:29 -07:00
Ronald S. Bultje
7374fac804
h264: fix overreads in cabac reader.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 08:01:28 -07:00
Ronald S. Bultje
d360dd902c
wmall: fix seeking.
2012-03-28 07:14:21 -07:00
Ronald S. Bultje
0a82f5275f
lagarith: fix buffer overreads.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 07:06:47 -07:00
Diego Biurrun
c0b34e6148
dvdec: drop unnecessary dv_tablegen.h #include
...
dvdec.c uses nothing from dv_tablegen.h. As a welcome side-effect, this
fixes compilation of that file with hardcoded tables enabled.
2012-03-28 15:51:43 +02:00
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Diego Biurrun
856c8e0a04
faandct: Remove FAAN_POSTSCALE define and related code.
...
It is not a user-accessible option and unlikely to ever be changed.
2012-03-28 09:38:31 +02:00
Anton Khirnov
a839dbb94e
dvenc: print allowed profiles if the video doesn't conform to any of them.
2012-03-28 09:29:04 +02:00
Anton Khirnov
3c6607eb6f
avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
...
Otherwise realloc would free it, which would result in double free
later.
2012-03-28 09:28:47 +02:00
Paul B Mahol
55abaa58e5
westwood_vqa: fix SND0 chunk handling
...
Version from vqa header does not dictate which sound chunks may
appear in file.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-27 11:58:15 -04:00
Ronald S. Bultje
98df2e2414
raw: forward avpicture_fill() error code in raw_decode().
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-27 08:54:07 -07:00
Diego Biurrun
d724fe665b
dv: Split off DV video decoder into its own file.
2012-03-27 11:15:47 +02:00
Mashiat Sarker Shakkhar
95b192de5d
vc1: Do not read from array if index is invalid.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-26 17:48:13 -07:00
Ronald S. Bultje
2ad405548b
targa: convert to bytestream2.
...
Also remove some write-only variables or write-only variable
assignments, remove internal colorspace conversion to native
endianness (that can be done by swscale much more efficiently),
and some cosmetics.
2012-03-26 17:46:16 -07:00
Ronald S. Bultje
5484170ac7
rv34: set mb_num_left to 0 after finishing a frame
...
Prevents running error resilience on a previous frame which will write
to the pic->mb_type[] array of the previous image. The array might
already be re-used for a new image in a subsequent thread, thus cause
two threads to write to the same pic->mb_type[] array, causing a race
condition which can crash in rv34_decode_cbp(), called by
rv34_decode_inter_mb_header() (which accesses mb_type[] twice,
assuming values are maintained, which the race condition breaks).
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-26 16:39:01 -07:00
Diego Biurrun
72ccfb3cb7
build: ppc: drop stray leftover backslash
2012-03-26 16:37:57 +02:00
Diego Biurrun
e7e19b15c7
build: Only clean the architecture subdirectory we build for.
...
This allows simplifying the Makefiles; it is no longer necessary to register
arch subdirectory Makefiles, just putting them in place is enough.
2012-03-26 13:29:03 +02:00
Diego Biurrun
ad0e31f134
build: prettyprinting cosmetics
2012-03-26 13:00:10 +02:00
Ronald S. Bultje
b2af057a36
smacker: convert palette and header reading to bytestream2.
2012-03-25 16:31:16 -07:00
Ronald S. Bultje
c3bbd0b53b
alac: convert extradata reading to bytestream2.
2012-03-25 13:35:05 -07:00
Diego Biurrun
62ce9defb8
x86: dsputil: prettyprint gcc inline asm
2012-03-25 11:50:48 +02:00
Diego Biurrun
3b54912113
x86: K&R prettyprinting cosmetics for dsputil_mmx.c
2012-03-25 11:50:48 +02:00
Diego Biurrun
915a2a0a65
x86: conditionally compile H.264 QPEL optimizations
2012-03-25 11:50:45 +02:00
Diego Biurrun
3816642eab
dsputil_mmx: Surround QPEL macros by "do { } while (0);" blocks.
...
This makes them safe to use in non-fully braced if-blocks and similar.
2012-03-25 11:48:37 +02:00
Ronald S. Bultje
3a3f06b05e
dpcm: convert to bytestream2.
2012-03-24 19:02:26 -07:00
Ronald S. Bultje
f31a68e78c
interplayvideo: convert to bytestream2.
2012-03-24 17:09:18 -07:00
Alexander Strange
cb34867780
h264: fix memleak in error path.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:34:33 -07:00
Alexander Strange
147ee4cf06
pthread: Immediately release all frames in ff_thread_flush()
...
Before this, they were only added to the delayed release queue and not
freed until later. This could lead to unnecessary memory use or buffer
exhaustion.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:29:51 -07:00
Alexander Strange
6ef4063957
h264: Add check for invalid chroma_format_idc
...
Fixes a crash when FF_DEBUG_PICT_INFO is used.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:29:38 -07:00
Ronald S. Bultje
ec0ed97b04
utvideo: port header reading to bytestream2.
...
Fixes crash during slice size reading if slice_end goes negative.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-24 15:15:56 -07:00
Ronald S. Bultje
2ee01fbded
pthread: free progress if buffer allocation failed.
...
Else we run out of progress variables after a few failed buffer
allocations.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-24 21:29:35 +01:00
Ronald S. Bultje
bc1ef85520
lavc/avconv: support changing frame sizes in codecs with frame mt.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-24 21:29:16 +01:00
Kostya Shishkov
72dadaa957
utvideo: mark output picture as keyframe.
...
Spotted by Антон.
2012-03-24 20:21:33 +01:00
Aneesh Dogra
cc965300cb
sunrast: Add support for negative linesize.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-24 11:27:20 -04:00
Janne Salonen
14ba7472dc
vp8: fix update_lf_deltas in libavcodec/vp8.c
...
lf_delta.ref[i] and lf_delta.mode[i] were incorrectly reset to 0 if
specific delta value was not updated. Fixed to keep the previous value
if flag indicates that element in question is not updated.
Signed-off-by: Janne Salonen <jsalonen@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 08:22:05 -07:00
Kostya Shishkov
494bce6224
ralf: read Huffman code lengths without GetBitContext
...
Those descriptions are stored in nibbles, so they are easy to extract.
And this way we don't need to pad tables for possible bit reader overreads.
2012-03-24 11:53:26 +01:00
Janne Grunau
cb7190cd2c
rv34: error out on size changes with frame threading
2012-03-23 23:11:55 +01:00
Alex Converse
b00307ecd0
aacsbr: Add a debug check to sbr_mapping.
...
There have been multiple bugs caused by inconsistencies here.
Based on an idea from Michael Niedermayer.
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse
0cb93dacee
aac: Reset some state variables when turning SBR off
...
This makes sure the reset flag gets set when SBR gets turned back on
and sets control variables for unguided mode back to their defaults.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse
a237b38021
aac: Reset PS parameters on header decode failure.
...
If the next header frame codes zero envelopes the previous frame's
values will be used. Consequently the invalid values must be cleared.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Ronald S. Bultje
71ea26811c
aacsbr: handle m_max values smaller than 4.
...
Prevents a signflip in the counter, and a subsequent crash because of
overreads/overwrites.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 12:56:08 -07:00
Janne Grunau
73ad4471a4
rv34: Handle only complete frames in frame-mt.
...
Correct handling of errors to prevent hags or crashes is very complex
otherwise.
The frame initializing is also moved from decode_slice() to
decode_frame() for clarity.
2012-03-23 17:50:46 +01:00
Janne Grunau
5ab506a5c8
MPV: set reference frame pointers to NULL when allocation of dummy pictures fails
2012-03-23 17:50:46 +01:00
Michael Niedermayer
afa6129016
zerocodec: factorize loop
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-23 12:10:41 +01:00
Ronald S. Bultje
262196445c
wmavoice: fix stack overread.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje
3c9267673e
wmalossless: error out if a subframe is not used by any channel.
...
Prevents infinite loop because min_channel_len never increments.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje
75d7975268
vqa: check palette chunk size before reading data.
...
Prevents overreads beyond buffer boundaries.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje
d462949974
wmalossless: reset sample pointer for each subframe.
...
Prevents overwrites when some subframes only encode some channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje
326f7a68bb
wmalossless: error out on invalid values for order.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Anton Khirnov
677df4d2ef
pngenc: better upper bound for encoded frame size.
...
Fixes encoding very large pictures.
Thanks to Костя for providing the formula.
2012-03-22 19:50:35 +01:00
Kostya Shishkov
87818103a0
wmall: output packet only if we have decoded some samples
...
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
2012-03-22 07:16:47 +01:00
Justin Ruggles
6aba117f12
adxenc: use AVCodec.encode2()
2012-03-21 15:04:42 -04:00
Justin Ruggles
54e6cf8a94
adxenc: Use the AVFrame in ADXContext for coded_frame
2012-03-21 15:04:42 -04:00
Ronald S. Bultje
68fd077f68
indeo4: fix out-of-bounds function call.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-03-21 19:01:08 +01:00
Justin Ruggles
5d4017b8f3
vorbisenc: use AVCodec.encode2()
2012-03-21 12:49:36 -04:00
Justin Ruggles
e5aab2d7a4
libvorbis: use AVCodec.encode2()
2012-03-21 12:49:36 -04:00