Martin Storsjö
e96b4a53df
vlc/rl: Add ff_ prefix to the nonstatic symbols
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:26 +02:00
Martin Storsjö
ddce8953a5
h263: Add ff_ prefix to nonstatic symbols
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:22 +02:00
Martin Storsjö
a082ac4125
mpegvideo: Remove a leftover function declaration
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:12 +02:00
Kostya Shishkov
1a265f6187
prores encoder
2012-02-15 07:14:51 +01:00
Kostya Shishkov
8835c2c829
prores: move data shared between decoder and encoder to common file
2012-02-15 07:14:45 +01:00
Kostya Shishkov
3ec623c22f
prores: fix multithreaded decoding case when slice quantisers are not the same
...
Since quantisation matrices are stored in context, decoding slices with
different quantisers in parallel leads to unpredictable content of
aforementioned matrices and wrong output picture thereof.
2012-02-15 07:14:35 +01:00
Paul B Mahol
dc4e57489f
CDXL demuxer and decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-14 22:32:53 +01:00
Janne Grunau
18d1d5886b
rv30: check block type validity
...
Prevents crashes with the fuzzed samples from bugs 88, 89 and 125 after
"golomb: avoid infinite loop on all-zero input".
2012-02-14 19:03:10 +01:00
Paul B Mahol
2af3dc8698
ttadec: CRC checking
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-14 13:00:55 -05:00
Janne Grunau
2bd730010d
rv34: handle size changes during frame multithreading
...
Factors all context dynamic memory handling to its own functions.
Fixes bug 220.
2012-02-14 14:46:11 +01:00
Janne Grunau
b54b40b33c
rv40: prevent undefined signed overflow in rv40_loop_filter()
2012-02-14 14:42:55 +01:00
Janne Grunau
29330721b0
rv34: use AVERROR return values in ff_rv34_decode_frame()
...
Also adds an error message.
2012-02-14 14:42:55 +01:00
Janne Grunau
bf61ef2316
rv34: use uint16_t for RV34DecContext.deblock_coefs
...
It is used as bitfield with 16 entries.
2012-02-14 14:42:55 +01:00
Diego Biurrun
a8798c7eb9
Drop unnecessary av_uninit attributes from some variable declarations.
...
Recent versions of gcc (4.4+) no longer give false positive warnings.
2012-02-13 19:20:52 +01:00
Diego Biurrun
0bf184e59c
Move PS2 MMI code below the mips subdirectory, where it belongs.
...
Also give a more suitable name to the MMI-optimized IDCT;
it is not PS2-specific, as the name currently suggests.
2012-02-13 09:59:53 +01:00
Diego Biurrun
75f11901b5
mips: Move MMI function declarations to a header.
...
This fixes compilation with -Werror=missing-prototypes.
2012-02-13 09:59:52 +01:00
Anton Khirnov
3dffa1b46c
cljr: implement encode2.
2012-02-12 08:05:57 +01:00
Anton Khirnov
177bb4bf50
cljr: set the properties of the coded_frame, not input frame.
2012-02-12 08:05:38 +01:00
Anton Khirnov
89829242a6
dnxhdenc: switch to encode2.
2012-02-12 08:03:46 +01:00
Anton Khirnov
3f77c41171
bmpenc: switch to encode2().
2012-02-12 08:02:28 +01:00
Aneesh Dogra
41afdd913a
sunrast: Return AVERROR values instead of -1.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-11 13:32:29 -08:00
Aneesh Dogra
4fbccfab23
sunrast: Add support for gray8 decoding.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-11 11:05:43 -08:00
Justin Ruggles
764852d653
alacenc: use AVCodec.encode2()
2012-02-11 12:49:23 -05:00
Justin Ruggles
bee80054f7
alacenc: cosmetics: indentation
2012-02-11 12:49:22 -05:00
Justin Ruggles
b6e8ff72ea
alacenc: consolidate bitstream writing into a single function.
...
Simplifies use of verbatim mode.
2012-02-11 12:49:22 -05:00
Justin Ruggles
b590f3a7bf
alacenc: only encode frame size in header for a final smaller frame
...
Otherwise it is not needed because it matches the frame size as encoded in
the extradata.
2012-02-11 12:49:22 -05:00
Justin Ruggles
ba821b098b
alacenc: store current frame size in AlacEncodeContext.
...
This avoids an indirection and will simplify implementation of encode2()
2012-02-11 12:49:22 -05:00
Justin Ruggles
65d15aec77
alacenc: return AVERROR codes in alac_encode_frame()
2012-02-11 12:49:22 -05:00
Justin Ruggles
302daf5800
alacenc: calculate a new max frame size for the final small frame
...
Gives a better estimate of buffer requirements and a better decision of
whether or not to use verbatim mode.
2012-02-11 12:49:22 -05:00
Justin Ruggles
fc9cf0b2a6
alacenc: pretty-printing and other cosmetics
2012-02-11 12:49:22 -05:00
Justin Ruggles
51c2483862
alacenc: fix error handling and potential memleaks in alac_encode_init()
2012-02-11 12:49:22 -05:00
Justin Ruggles
6e63228323
alacenc: do not set coded_frame->key_frame
...
It is already set in avcodec_alloc_frame()
2012-02-11 12:49:21 -05:00
Justin Ruggles
64fe3eaeb3
alacenc: do not set bits_per_coded_sample
...
encoded ALAC does not have a fixed number of bits per sample
2012-02-11 12:49:21 -05:00
Justin Ruggles
43a4cb070b
alacenc: remove unneeded frame_size check in alac_encode_frame()
2012-02-11 12:49:21 -05:00
Ronald S. Bultje
7416d61036
tta: error out if samplerate is zero.
...
Prevents a division by zero later on.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-11 08:13:53 -08:00
Justin Ruggles
6ab681a4c1
ttadec: fix invalid free when an error occurs while decoding 24-bit tta
2012-02-10 20:35:10 -05:00
Justin Ruggles
9d7cee50aa
wavpack: add needed braces for 2 statements inside an if block
2012-02-10 20:27:55 -05:00
Paul B Mahol
f98ede7e61
v210enc: remove redundant check for pix_fmt
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:59:23 -05:00
Paul B Mahol
c388558d31
wavpack: allow user to disable CRC checking
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:54:08 -05:00
Aneesh Dogra
eeb9e61a51
v210enc: Use Bytestream2 functions
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:38:24 -05:00
Paul B Mahol
dcd2b55e1a
Check AVCodec.pix_fmts in avcodec_open2()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 13:24:37 -05:00
Alex Converse
9e1db721c4
svq3: Prevent illegal reads while parsing extradata.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-10 09:57:39 -08:00
Rafaël Carré
b24aaabd44
remove ParseContext1
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-10 15:48:52 +01:00
Rafaël Carré
797639dcfd
vc1: use ff_parse_close
...
It works as long as ParseContext is the first member of the private struct
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-10 15:48:52 +01:00
Rafaël Carré
07554ace70
mpegvideo parser: move specific fields into private context
...
This obviates using ParseContext1, which is slated for removal.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-10 15:48:51 +01:00
Rafaël Carré
e40924887a
mpeg4video parser: move specific fields into private context
...
This obviates using ParseContext1, which is slated for removal.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-10 15:48:51 +01:00
Rafaël Carré
53a09964f0
cavs parser: fix parser context type
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-10 15:48:51 +01:00
Yordan Makariev
0c5d78a898
4xm, timefilter: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-10 15:48:50 +01:00
Ronald S. Bultje
45b7bd7c53
h264: disallow constrained intra prediction modes for luma.
...
Conversion of the luma intra prediction mode to one of the constrained
("alzheimer") ones can happen by crafting special bitstreams, causing
a crash because we'll call a NULL function pointer for 16x16 block intra
prediction, since constrained intra prediction functions are only
implemented for chroma (8x8 blocks).
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-09 22:57:01 -08:00
Alex Converse
81749f30cd
dv: Move tables from dvdata.h to dvdata.c
2012-02-09 19:16:15 -08:00
Alex Converse
8dbdc2d840
dv: Move a table used only by the demuxer out of a shared header.
2012-02-09 19:16:15 -08:00
Alex Converse
89c9a8d3fd
dv: Move functions used only by the encoder out of a shared header.
2012-02-09 19:16:15 -08:00
Alex Converse
3746072712
dv: Split dvdata.h into dvdata.h and dvquant.h
2012-02-09 19:16:15 -08:00
Justin Ruggles
b758cf7343
avcodec: set avpkt->size to 0 if encode2() did not output a packet
2012-02-09 21:51:41 -05:00
Justin Ruggles
a75bc764ec
avcodec: for audio encoding, set packet dts to packet pts.
...
There are no audio encoders which do frame reordering.
2012-02-09 21:51:29 -05:00
Justin Ruggles
d483bb58c3
ac3dsp: do not use pshufb in ac3_extract_exponents_ssse3()
...
We need to do unsigned saturation in order to cover the corner case when the
absolute coefficient value is 16777215 (the maximum value).
Fixes Bug #216
2012-02-09 21:04:44 -05:00
Michael Niedermayer
e6d9fa66f1
ac3dec: Move center and surround mix level tables to the parser.
...
That way all mix levels as exported by avpriv_ac3_parse_header()
will have the same meaning.
Previously the 3-bit center mix level for E-AC-3 was used to index in a
4-entry table, leading to out-of-array reads.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-02-09 16:36:02 -08:00
Alex Converse
7b05025856
aacdec: Unify preconfigured layout and PCE layout.
2012-02-09 13:33:07 -08:00
Alex Converse
f1ecd0802d
aacdec: Support native channel layout when requested.
2012-02-09 13:33:07 -08:00
Alex Converse
37bed6ff3f
aacdec: Try to sniff a reasonable channel layout for PCE based configurations.
...
This changes the output order of multichannel PCE based streams.
2012-02-09 13:33:06 -08:00
Martin Storsjö
e7d4a2a721
libavcodec: Don't do av_free(av_malloc(0)) for bitstream filters
...
This fixes crashes on exit when closing a bitstream filter that
hasn't allocated any private data, on OS X.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-09 23:13:50 +02:00
Janne Grunau
c57fe49da8
eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation
2012-02-09 21:28:37 +01:00
Ronald S. Bultje
73e15e8e6b
prores: specify array size outside DECLARE_ALIGNED brackets.
2012-02-09 11:07:12 -08:00
Paul B Mahol
9aff2d1753
tta: use skip_bits_long()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-09 17:10:26 +01:00
Diego Biurrun
f769cfedd8
build: Add missing directories to DIRS declarations.
2012-02-09 12:26:48 +01:00
Diego Biurrun
aa06d65693
arm: Add missing #include to vp8.h to fix a make checkheaders warning.
2012-02-09 12:26:47 +01:00
Diego Biurrun
0bba26466f
cosmetics: Delete empty lines at end of file.
2012-02-09 12:26:45 +01:00
Aneesh Dogra
ab9ae40152
bytestream: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 11:37:14 +01:00
Anton Khirnov
cd1ad18a65
rawenc: switch to encode2().
...
This changes a number of FATE results, since before this commit, the
timestamps in all tests using rawenc were made up by lavf.
In most cases, the previous timestamps were completely bogus.
In some other cases -- raw formats, mostly h264 -- the new timestamps
are bogus as well. The only difference is that timestamps invented by
the muxer are replaced by timestamps invented by the demuxer.
cscd -- avconv sets output codec timebase from r_frame_rate
and r_frame_rate is in this case some guessed number 31.42 (377/12),
which is not accurate enough to represent all timestamps. This results
in some frames having duplicate pts. Therefore, vsync 0 needs to be
changed to vsync 2 and avconv drops two frames. A proper fix in the
future would be to set output timebase to something saner in avconv.
nuv -- previous timestamps for video were wrong AND the cscd
comment applies, one frame is dropped.
vp8-signbias -- the file contains two frames with identical timestamps,
so -vsync 0 needs to be removed/changed to -vsync 2 and avconv drops one
frame.
vc1-ism -- apparrently either the demuxer lies about timestamps or the
file is broken, since dts == pts on all packets, but reordering clearly
takes place.
2012-02-08 21:51:24 +01:00
Anton Khirnov
38d5533228
pixdesc: mark pseudopaletted formats with a special flag.
...
This makes it possible to dintinguish them from PAL8.
Fixes an invalid write in avpicture_layout().
2012-02-08 21:01:31 +01:00
Anton Khirnov
06484d0b8a
libx264: implement encode2().
2012-02-08 20:59:07 +01:00
Anton Khirnov
05d699222d
libx264: split extradata writing out of encode_nals().
...
This is done in preparation for the following patch.
2012-02-08 20:58:48 +01:00
Anton Khirnov
52f82a1148
lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket
...
Deprecate avcodec_encode_video().
2012-02-08 20:54:24 +01:00
Ronald S. Bultje
ce1e250ee9
h264: manually save/restore XMM registers for functions using INIT_MMX.
...
On Win64, these registers are callee-save, so not saving/restoring them
correctly is a violation of ABI and can lead to crashes or corrupt data.
2012-02-08 10:31:14 -08:00
Alex Converse
314af0ff94
aacdec: Use correct speaker order for 7.1.
...
The spec says the following speaker mapping is default:
center front speaker
left, right center front speakers,
left, right outside front speakers,
left surround, right surround rear speakers,
front low frequency effects speaker
2012-02-08 09:56:37 -08:00
Alex Converse
8ece266213
aacdec: Remove incorrect comment.
...
It was only correct when element ids met very specific criteria.
2012-02-08 09:56:37 -08:00
Alex Converse
e600a1e44a
aacdec: Simplify output configuration.
2012-02-08 09:56:37 -08:00
Diego Biurrun
0144fe6995
Remove Sun medialib glue code.
...
It is obscure, most likely unused and not bit-exact compared to
libavcodec due to a different IDCT transform algorithm.
2012-02-08 08:52:30 +01:00
Ronald S. Bultje
9b027c0d07
dsputil: set STRIDE_ALIGN to 16 for x86 also.
...
This fixes crashes in e.g. PNG decoding with SSE2 enabled. In fact, many
x86 optimizations for codecs assume that our buffer strides are 16-byte
aligned.
2012-02-07 14:54:46 -08:00
Ronald S. Bultje
4ff6dea390
pngdsp: swap argument inversion.
2012-02-07 14:32:26 -08:00
Michael Kostylev
3206cccc0e
h264: mark h264_idct_add8_10 with number of XMM registers.
...
This fixes XMM register clobber problems on Win64.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-07 11:37:13 -08:00
Ronald S. Bultje
fb90785e98
vp8: always update next_framep[] before returning from decode_frame().
...
Also slightly move around code not allocate a new frame if we won't
decode it. This prevents us from putting undecoded frames in frame
pointers, which (in mt decoding) other threads will use and wait on
as references, causing a deadlock (if we skipped decoding) or a crash
(if we didn't initialized next_framep[] at all).
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-07 11:29:02 -08:00
Justin Ruggles
37390d5cca
apedec: allow the user to set the maximum number of output samples per call
...
It makes sense in some cases to split up the output packet to save on memory
usage (ape frames can be very large), but the current/default size is
arbitrary. Allowing the user to configure this gives more flexibility and
requires minimal additional code.
2012-02-07 10:01:15 -05:00
Justin Ruggles
39575eead2
apedec: do not unnecessarily zero output samples for mono frames
2012-02-07 10:01:15 -05:00
Justin Ruggles
1d3c672d27
apedec: allocate a single flat buffer for decoded samples
...
This will allow the decoder to return samples for the full packet, and it also
makes the decoded buffer pointers aligned.
2012-02-07 10:01:14 -05:00
Justin Ruggles
32c61400c0
apedec: use sizeof(field) instead of sizeof(type)
2012-02-07 10:01:14 -05:00
Aneesh Dogra
db7d45237a
bytestream: Add bytestream2 writing API.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-06 18:56:13 -05:00
Paul B Mahol
d016d3074c
Revert "v210enc: use FFALIGN()"
...
FFALIGN doesn't work with non-powers-of-2.
This reverts commit 7ad1b612c8
.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 19:57:52 +01:00
Diego Biurrun
32f3c541bc
doxygen: Do not include license boilerplates in Doxygen comment blocks.
2012-02-06 19:39:24 +01:00
Kieran Kunhya
9814974d2e
avcodec: Clarify AVFrame member documentation.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-06 18:08:08 +01:00
Paul B Mahol
3cc0353f8d
v210dec: check for coded_frame allocation failure
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 08:00:31 +01:00
Paul B Mahol
986c1c483b
v210enc: use stride as it is already calculated
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 08:00:23 +01:00
Paul B Mahol
7ad1b612c8
v210enc: use FFALIGN()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 08:00:15 +01:00
Paul B Mahol
b5f50da593
v210enc: return proper AVERROR codes instead of -1
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 07:59:47 +01:00
Paul B Mahol
66fa2a1fb3
v210enc: do not set coded_frame->key_frame
...
It is already set in avcodec_alloc_frame().
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 07:59:24 +01:00
Paul B Mahol
d73466f841
v210enc: check for coded_frame allocation failure
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 07:59:16 +01:00
Paul B Mahol
b60620bf7e
apedec: 8bit and 24bit support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-04 14:03:20 -05:00
Justin Ruggles
6f1a5e8d6b
dsputil: remove debug message in dsputil_init().
...
AVCodecContext.bits_per_raw_sample is used for audio too, and values other
than 8, 9, and 10 are valid.
2012-02-03 16:00:30 -05:00
Justin Ruggles
22c0babbb2
apedec: remove unneeded #include of get_bits.h and associated macro
2012-02-02 21:07:01 -05:00
Justin Ruggles
e4169612a1
apedec: av_fast_malloc() instead of av_realloc()
...
av_realloc() does not guarantee alignment, which is required for
DSPContext.bswap_buf().
2012-02-02 21:07:01 -05:00
Justin Ruggles
0759c8eb10
apedec: fix handling of packet sizes that are not a multiple of 4 bytes
2012-02-02 21:07:01 -05:00
Anton Khirnov
e15e2a6d2a
libx264: fix indentation.
2012-02-02 22:23:17 +01:00
Ronald S. Bultje
24947d4988
vorbis: fix overflows in floor1[] vector and inverse db table index.
2012-02-02 12:05:08 -08:00
Ronald S. Bultje
7e4d9d5d45
win64: add a XMM clobber test configure option.
...
This will be useful to test more aggressively for failures to mark XMM
registers as clobbered in Win64 builds, and prevent regressions thereof.
Based on a patch by Ramiro Polla <ramiro.polla@gmail.com>
2012-02-02 12:00:48 -08:00
Mans Rullgard
cd2f98f365
ARM: ac3: fix ac3_bit_alloc_calc_bap_armv6
...
This function was broken when the start bin was not at the start
of a band.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-02-02 18:50:42 +00:00
Piotr Bandurski
3f57bde1f2
frwu: lowercase the FRWU codec name
...
This is more consistent with all the other codec names.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-02 18:44:52 +01:00
Paul B Mahol
38c6bbc118
ra144enc: drop pointless "encoder" from .long_name
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-01 20:17:25 -05:00
Justin Ruggles
c3a06615bd
bethsoftvideo: fix palette reading.
...
Return the correct number of consumed bytes and set *data_size = 0.
Returned size is 1 too small, leading to that 1 byte being read as the next
frame, which results in an extra blank frame at the beginning of the stream.
2012-02-01 19:41:39 -05:00
Justin Ruggles
83ce51cc7d
mpc7: use av_fast_padded_malloc()
...
Avoids doing malloc/free for each frame.
Also fixes valgrind errors due to use of uninitialized padding bytes.
Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-01 19:35:59 -05:00
Justin Ruggles
b5b825c381
mpc7: simplify handling of packet sizes that are not a multiple of 4 bytes
2012-02-01 19:35:59 -05:00
Justin Ruggles
236a550c3f
Fix a typo in the x86 asm version of ff_vector_clip_int32()
...
Specifies the correct number of xmm registers used so that they can be saved
and restored on Win64 if necessary.
2012-02-01 19:02:32 -05:00
Justin Ruggles
3c432631e9
pcmenc: Do not set avpkt->size.
...
It is already the correct size as set by ff_alloc_packet().
2012-02-01 16:33:27 -05:00
Justin Ruggles
1a670973a7
ff_alloc_packet: modify the size of the packet to match the requested size
...
This will simplify encoders which use this function to request the exact
packet size rather than the maximum size.
2012-02-01 16:33:27 -05:00
Paul B Mahol
5ff88020ac
frwu: Employ more meaningful return values.
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-01 16:17:47 -05:00
Reimar Döffinger
f54ae2f8e7
fraps: Use av_fast_padded_malloc() instead of av_realloc()
...
Ensures alignment and avoids using uninitialized data.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-01 14:37:47 -05:00
Reimar Döffinger
0880503fbb
mjpegdec: use av_fast_padded_malloc()
...
also check for allocation failure
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-01 14:37:47 -05:00
Reimar Döffinger
2f4b9021a1
eatqi: use av_fast_padded_malloc()
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-01 14:37:47 -05:00
Reimar Döffinger
00db4d4ad5
asv1: use av_fast_padded_malloc()
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-01 14:37:46 -05:00
Janne Grunau
316fc7443b
avcodec: Add av_fast_padded_malloc().
...
Wrapper around av_fast_malloc() that keeps FF_INPUT_BUFFER_PADDING_SIZE
zero-padded bytes at the end of the used buffer.
Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>.
2012-02-01 19:19:35 +01:00
Diego Biurrun
3b637dca72
avcodec.h: Remove some disabled cruft.
2012-02-01 17:27:17 +01:00
Paul B Mahol
8ca8e4a846
zmbv: Employ more meaningful return values.
...
Also use av_log_ask_for_sample() where it makes sense.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-01 14:24:25 +01:00
Paul B Mahol
013a677fb6
zmbvenc: Employ more meaningful return values.
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-01 14:23:20 +01:00
Janne Grunau
510ef04a46
vc1: prevent null pointer dereference on broken files
...
CC: libav-stable@libav.org
2012-02-01 12:54:39 +01:00
Janne Grunau
cb0b284381
zmbv: check av_realloc() return values and avoid memleaks on ENOMEM
2012-02-01 12:54:39 +01:00
Paul B Mahol
d4eeadcbbf
truespeech: align buffer
...
DSPContext.bswap_buf() requires aligned output
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-31 21:42:33 -08:00
Mans Rullgard
034b03e7a0
ac3: Do not read past the end of ff_ac3_band_start_tab.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-31 18:32:14 -08:00
Janne Grunau
e67e3a3f4a
fate-golomb: extend golomb-test to get_ue_golomb_long()
...
get_ue_golomb_long() is only tested for values up to 2^15 - 2 since
we can not write larger values.
Silence the test on success and return a non-zero value on error.
Use an heap scratch buffer instead of large stack buffer.
Remove unneeded includes.
2012-02-01 01:18:55 +01:00
Diego Biurrun
9e3a2736bd
golomb-test: K&R formatting cosmetics
2012-01-31 19:56:13 +01:00
Diego Biurrun
631f96f959
h264: Split h264-test off into a separate file - golomb-test.c.
...
The new name is more appropriate as only golomb functions are tested.
2012-01-31 19:56:12 +01:00
Diego Biurrun
4ff46af039
h264-test: cleanup: drop timer invocations, commented out code and other cruft
2012-01-31 19:56:11 +01:00
Diego Biurrun
3856a2aaa6
h264-test: Remove unused DSP and AVCodec contexts and related init calls.
...
This also avoids a segfault on startup.
2012-01-31 19:56:09 +01:00
Diego Biurrun
b010178e84
adpcm: Add missing stdint.h #include to fix standalone header compilation.
2012-01-31 19:13:00 +01:00
Anton Khirnov
bc90199848
lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
...
This way, if the AVCodecContext is allocated for a specific codec, the
caller doesn't need to store this codec separately and then pass it
again to avcodec_open2().
It also allows to set codec private options using av_opt_set_* before
opening the codec.
2012-01-31 16:53:35 +01:00
Anton Khirnov
0e72ad95f9
lavc: make avcodec_close() work properly on unopened codecs.
...
I.e. free the priv_data and other stuff allocated in
avcodec_alloc_context3() and not segfault.
2012-01-31 07:56:21 +01:00
Anton Khirnov
af08d9aeea
lavc: add avcodec_is_open().
...
It allows to check whether an AVCodecContext is open in a documented
way. Right now the undocumented way this check is done in lavf/lavc is
by checking whether AVCodecContext.codec is NULL. However it's desirable
to be able to set AVCodecContext.codec before avcodec_open2().
2012-01-31 07:55:24 +01:00
Anton Khirnov
afa4069e3b
lavc/lavf: remove unnecessary symbols from the symbol version script.
2012-01-31 07:26:31 +01:00
Anton Khirnov
f5f49a66a2
lavc: reorder AVCodec fields.
...
Put all private fields at the end and mark them as such so they can be
easily changed/removed.
This breaks ABI.
2012-01-31 07:26:18 +01:00
Alex Converse
f372ce119b
mp3dec: Fix a heap-buffer-overflow
...
In some cases, what is left to read from ptr is smaller than EXTRABYTES.
Based on a patch by Thierry Foucu <tfoucu@gmail.com>.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-30 16:49:15 -08:00
Justin Ruggles
a3a0691bde
adpcmenc: remove some unneeded casts
2012-01-30 19:12:55 -05:00
Justin Ruggles
149f2058a4
adpcmenc: use int16_t and uint8_t instead of short and unsigned char.
2012-01-30 19:12:55 -05:00
Justin Ruggles
dd88ae831a
adpcmenc: fix adpcm_ms extradata allocation
...
Add FF_INPUT_BUFFER_PADDING_SIZE.
If allocation fails, also free memory which was allocated previously in
adpcm_encode_init().
2012-01-30 19:12:55 -05:00
Justin Ruggles
877a1d409c
adpcmenc: return proper AVERROR codes instead of -1
2012-01-30 19:12:55 -05:00
Justin Ruggles
cb023d9afe
adpcmenc: check for coded_frame allocation failure
2012-01-30 19:12:55 -05:00
Justin Ruggles
ddf70db6d7
adpcmenc: Do not set coded_frame->key_frame.
...
It is already set in avcodec_alloc_frame().
2012-01-30 19:12:54 -05:00
Justin Ruggles
3c4add27f7
mpc7: check for allocation failure
2012-01-30 19:11:29 -05:00
Justin Ruggles
eac31dd163
mpc7: align local temp buffer
...
DSPContext.bswap_buf() requires aligned output
2012-01-30 19:11:29 -05:00
Christophe Gisquet
e5c9de2ab7
rv40: x86 SIMD for biweight
...
Provide MMX, SSE2 and SSSE3 versions, with a fast-path when the weights are
multiples of 512 (which is often the case when the values round up nicely).
*_TIMER report for the 16x16 and 8x8 cases:
C:
9015 decicycles in 16, 524257 runs, 31 skips
2656 decicycles in 8, 524271 runs, 17 skips
MMX:
4156 decicycles in 16, 262090 runs, 54 skips
1206 decicycles in 8, 262131 runs, 13 skips
MMX on fast-path:
2760 decicycles in 16, 524222 runs, 66 skips
995 decicycles in 8, 524252 runs, 36 skips
SSE2:
2163 decicycles in 16, 262131 runs, 13 skips
832 decicycles in 8, 262137 runs, 7 skips
SSE2 with fast path:
1783 decicycles in 16, 524276 runs, 12 skips
711 decicycles in 8, 524283 runs, 5 skips
SSSE3:
2117 decicycles in 16, 262136 runs, 8 skips
814 decicycles in 8, 262143 runs, 1 skips
SSSE3 with fast path:
1315 decicycles in 16, 524285 runs, 3 skips
578 decicycles in 8, 524286 runs, 2 skips
This means around a 4% speedup for some sequences.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-30 23:58:25 +01:00
Diego Biurrun
91bafb52ae
x86: Give RV40 init file a more suitable name.
2012-01-30 23:58:24 +01:00
Diego Biurrun
c30b198381
x86: Place mm_flags variable declaration below the appropriate #ifdef.
...
This fixes some unused variable warnings with YASM disabled.
2012-01-30 23:58:23 +01:00
Justin Ruggles
89eea6df28
aacenc: make sure to encode enough frames to cover all input samples.
...
Currently, any samples in the final frame are not decoded because they are
only represented by one frame instead of two. So we encode two final frames to
cover both the analysis delay and the MDCT delay.
2012-01-30 14:20:24 -05:00