Commit Graph

17085 Commits

Author SHA1 Message Date
Janne Grunau
5945c7b35d h264: slice-mt: check master context for valid current_picture_ptr
Fixes errors in slice based multithreading introduced in 0b300daad2.

CC: libav-stable@libav.org
2012-12-05 23:16:37 +01:00
Janne Grunau
a8cb1746c5 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .

CC: libav-stable@libav.org
2012-12-05 23:16:37 +01:00
Justin Ruggles
5e1bbb8c7e alacenc: add support for multi-channel encoding 2012-12-05 16:13:37 -05:00
Janne Grunau
c15fea7933 mimic: initialize padding of swap_buf through av_fast_padded_malloc 2012-12-05 00:02:44 +01:00
Janne Grunau
42060c7030 eamad: initialize padding of bitstream_buf through av_fast_padded_malloc() 2012-12-05 00:02:44 +01:00
Anton Khirnov
df9b956751 lavc: fix decode_frame() third parameter semantics for video decoders
It's got_frame, not data size
2012-12-04 21:45:36 +01:00
Anton Khirnov
387bef95d2 lavc: factorise setting buffer type in avcodec_default_get_buffer(). 2012-12-04 21:45:23 +01:00
Anton Khirnov
e57c4706e9 lavc: don't reuse audio buffers
Any performance gain from this is negligible and not worth the extra
code.
2012-12-04 21:43:53 +01:00
Anton Khirnov
ff953fecff lavc: set frame properties in ff_get_buffer().
There is no point in duplicating this code in every get_buffer()
implementation.
2012-12-04 21:42:44 +01:00
Anton Khirnov
594d4d5df3 lavc: add a wrapper for AVCodecContext.get_buffer().
It will be useful in the upcoming transition to refcounted AVFrames.
2012-12-04 21:41:59 +01:00
Anton Khirnov
cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Janne Grunau
0b300daad2 h264: error out on unset current_picture_ptr for h->current_slice > 0
Fixes a segfault with fuzzed sample sample_varPAR_s11622_r001-02.avi.

CC: libav-stable@libav.org
2012-12-02 23:24:53 +01:00
Christophe Gisquet
e32bea8eb4 aac: avoid a memcpy in sbr_qmf_analysis
Swapping buffer indices allows saving one memcpy that accounts for 1% of the
runtime, according to oprofile.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-02 21:07:48 +01:00
Diego Biurrun
9d46eaec7a build: The FLAC encoder also depends on the flacdsp code
Fixes linking with only the FLAC encoder enabled.
2012-11-29 17:15:57 +01:00
Janne Grunau
c1fcf563b1 h264: check context state before decoding slice data partitions
Fixes mov_h264_aac__Demo_FlagOfOurFathers.mov.SIGSEGV.4e9.656.

Found-by: Mateusz "j00ru" Jurczyk
CC: libav-stable@libav.org
2012-11-29 14:40:05 +01:00
Janne Grunau
3ae69b9166 flashsv: make sure data for zlib priming is available
Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.

CC: libav-stable@libav.org
2012-11-29 14:15:05 +01:00
Diego Biurrun
9b15c0a9b3 x86: dsputilenc: port to cpuflags 2012-11-28 16:05:44 +01:00
Diego Biurrun
89145fbbfe x86: h264dsp: Fix linking with yasm and optimizations disabled
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.
2012-11-28 14:45:28 +01:00
Diego Biurrun
2e89aeed65 x86: h264_idct: port to cpuflags 2012-11-28 00:28:09 +01:00
Piotr Bandurski
f5fa03660d vble: Do not abort decoding when version is not 1
Some combinations of OS, VirtualDub, and VBLE can accidentally
set the version to a value other than 1. Since no other version
of VBLE was ever released, simply warn about it.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-11-27 17:16:04 -05:00
Diego Biurrun
28e1cf19aa x86: h264_weight: port to cpuflags 2012-11-27 21:10:38 +01:00
Janne Grunau
d5e83122bd h264: set Picture.owner2 to the current thread
This does not seem to have an effect currently. Fate-h264 passes with
THREADS=1..16 and both threading types as before. It fixes however a
segfault during error resilience with my adaptive-frame-mt patchset.
A picture in use during error resilience gets realloced in another
thread in the fuzzed sample sample_varPAR.avi_s226019.
2012-11-27 12:26:33 +01:00
Janne Grunau
6e5cdf2628 h264: check ref_count validity for num_ref_idx_active_override_flag
Fixes segfault in the fuzzed sample bipbop234.ts_s226407.

CC: libav-stable@libav.org
2012-11-27 12:26:33 +01:00
Janne Grunau
150b2361ca h264: add missing new line to log message 2012-11-27 12:26:33 +01:00
Michael Niedermayer
5d47850bbd dcadec: skip QMF on unused channels
When the extra rear channel is present but unused, the
s->channel_order_tab[] value for that channel is -1. The QMF can be
skipped for the extra channel, and doing so avoids an out-of-array read
on s->samples_chanptr[].

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-26 22:50:37 -05:00
Justin Ruggles
284ea790d8 dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil 2012-11-26 11:29:06 -05:00
Michael Niedermayer
1e27655388 aacenc: use the correct output buffer
This fixes segfault caused by 3d3cf6745e
when SingleChannelElement.ret was renamed to SingleChannelElement.ret_buf.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-26 11:17:17 -05:00
Mans Rullgard
edd80ec7e3 aacdec: fix signed overflows in lcg_random()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-26 13:34:58 +00:00
Janne Grunau
5ae72f5453 flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.

CC: libav-stable@libav.org
2012-11-26 10:26:01 +01:00
Janne Grunau
706acb558a h264: enable low delay only if no delayed frames were seen
Dropping frames is undesirable but that is the only way by which the
decoder could return to low delay mode. Instead emit a warning and
continue with delayed frames.
Fixes a crash in fuzzed sample nasa-8s2.ts_s20033 caused by a larger
than expected has_b_frames value. Low delay keeps getting re-enabled
from a presumely broken SPS.

CC: libav-stable@libav.org
2012-11-26 10:25:39 +01:00
Diego Biurrun
7ee4071362 x86: fix build without inline asm
The qpel functions referenced here are not related to h264 and should
thus never have been under CONFIG_H264QPEL.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-26 01:50:47 +01:00
Justin Ruggles
3d3cf6745e aacdec: use float planar sample format for output 2012-11-25 19:06:36 -05:00
Justin Ruggles
8e134e5104 lavc: clarify get_buffer() documentation
This is needed for the AAC decoder, which may need to call get_buffer()
more than once if the channel configuration changes.
2012-11-25 19:06:36 -05:00
Justin Ruggles
3ffed68c2a mpegaudiodec: use planar sample format for output unless packed is requested 2012-11-25 19:05:58 -05:00
Justin Ruggles
2d3993ce8c x86: h264 qpel: use the correct number of utilized xmm regs in cglobal
Fixes xmm register clobbering on win64.
2012-11-25 18:48:43 -05:00
Daniel Kang
610e00b359 x86: h264: Convert 8-bit QPEL inline assembly to YASM
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-25 20:38:35 +01:00
Daniel Kang
ad01ba6cea x86: h264: Remove 3dnow QPEL code
The only CPUs that have 3dnow and don't have mmxext are 12 years old.
Moreover, AMD has dropped 3dnow extensions from newer CPUs.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-25 20:32:55 +01:00
Diego Biurrun
28c8e288fa x86: h264_chromamc: port to cpuflags 2012-11-25 17:25:10 +01:00
Mans Rullgard
5e39bb073a mpegvideo: simplify dxy calculation in hpel_motion()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:03:54 +00:00
Xi Wang
0d3123666a cdgraphics: fix incorrect vertical offset mask in cdg_scroll()
The vertical offset mask 0x07 is suspicious.

    v_off = FFMIN(data[2] & 0x07, CDG_BORDER_HEIGHT - 1);

Note that v_off is up to 11 (CDG_BORDER_HEIGHT - 1), the correct mask
should be 0x0F.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-21 14:35:26 +01:00
Diego Biurrun
17fecb4a59 flashsv: Drop unused function and struct parameters 2012-11-21 11:49:41 +01:00
Justin Ruggles
00dd9a6d6a pcm: fix decoding of pcm_s16le_planar on big-endian
The sample count is decremented by the DECODE() macro and needs to be reset
in each loop iteration. Also, DECODE() increments the src pointer so that does
not need to be done separately.
2012-11-20 10:52:49 -05:00
Luca Barbato
ae3822bca1 imgconvert: remove PixFmtInfo
It is pleonastic and was used in stale functions pending replacement.
2012-11-20 12:45:58 +01:00
Luca Barbato
d1d9efaae6 avcodec: split avpicture from imgconvert
All the non deprecated functions are in avpicture.c now.
2012-11-20 12:45:58 +01:00
Justin Ruggles
7c278d2ae4 alacenc: support 24-bit encoding 2012-11-20 00:26:45 -05:00
Justin Ruggles
c9d0f4506f pcmdec: use planar sample format for pcm_s16le_planar 2012-11-19 23:48:37 -05:00
Justin Ruggles
79b7747556 vorbisdec: use float planar sample format 2012-11-19 23:48:37 -05:00
Diego Biurrun
89923fce70 x86: h264_intrapred: Fix C function names in comments
Function names changed after switching to declaration with
PRED4x4/8x8/8x8L/16x16 macros in the C code.
2012-11-18 18:34:05 +01:00
Diego Biurrun
87af05c575 x86: SPLATD: port to cpuflags 2012-11-18 18:34:05 +01:00
John Stebbins
1c5805521c PGS subtitles: Set AVSubtitle pts value
pts should be that of the packet containing the presentation segment.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-18 18:34:05 +01:00
Janne Grunau
e6160bda98 h264: Fix parameters to ff_er_add_slice() call
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.

CC: libav-stable@libav.org
2012-11-16 13:18:28 +01:00
Janne Grunau
60b6b8c019 h264: always check ref_count for validity
Fixes a crash with zuffed files.
2012-11-16 13:18:28 +01:00
Diego Biurrun
8c3849bc76 x86: dsputil: port to cpuflags 2012-11-16 10:38:23 +01:00
Xi Wang
b74dbdd5e9 bgmc: Fix av_malloc checks in ff_bgmc_init()
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-14 23:03:36 +01:00
Diego Biurrun
26301caaa1 x86: mmx2 ---> mmxext in asm constructs 2012-11-14 00:58:51 +01:00
Diego Biurrun
da39cac8de Drop broken and unused CABAC test program. 2012-11-14 00:36:17 +01:00
Diego Biurrun
5e9c6ef8f3 x86: h264_weight_10bit: port to cpuflags 2012-11-13 19:07:09 +01:00
Luca Barbato
83f9ed42ec libtheoraenc: add missing pixdesc.h header
Was left out from c1a02e884a.
2012-11-13 17:42:13 +01:00
Luca Barbato
cc085993f4 avcodec: remove ff_is_hwaccel_pix_fmt
It is used only in one place and is unlikely it would be needed
elsewhere.
2012-11-13 16:21:47 +01:00
Luca Barbato
c1a02e884a pixdesc: add av_pix_fmt_get_chroma_sub_sample
Deprecate avcodec_get_chroma_sub_sample.
2012-11-13 16:14:55 +01:00
Mans Rullgard
a384f6a7f7 ppc: replace pointer casting with AV_COPY32
This removes warnings about strict aliasing violations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Mans Rullgard
031aac9861 ppc: fix some unused variable warnings
The third argument of OP_U8_ALTIVEC is evaluated at most once so
there is no need for a potentially unused temporary variable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Justin Ruggles
faf340f60c binkaudio: set channel layout 2012-11-12 00:41:02 -05:00
Diego Biurrun
2b479bcab0 build: Drop AVX assembly ifdefs
An assembler able to cope with AVX instructions is now required.
2012-11-11 20:43:28 +01:00
Justin Ruggles
a903f8f087 Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Alberto Delmás
802713c4e7 mss2: prevent potential uninitialized reads
The alternative to zeroing on init is setting the corrupted flag in
all cases where pal_pic is not fully written, at the cost of added
complexity.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-11-11 16:07:50 +01:00
Kostya Shishkov
6d93308c0c mss2: reindent after last commit 2012-11-11 16:07:42 +01:00
Alberto Delmás
b077eb0780 mss2: fix handling of unmasked implicit WMV9 rectangles
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-11-11 16:07:36 +01:00
Diego Biurrun
6cd796049d x86: h264_qpel_10bit: drop unused parameter from MC10/MC20/MC30 macros 2012-11-10 14:49:09 +01:00
Diego Biurrun
4b60fac419 x86: PALIGNR: port to cpuflags 2012-11-09 21:31:31 +01:00
Diego Biurrun
4d1f69f244 x86: h264_qpel_10bit: port to cpuflags 2012-11-09 21:17:05 +01:00
Justin Ruggles
3a2731cbd3 flacenc: ensure the order is within the min/max range in LPC order search
This fixes use of uninitialized values when the FLAC encoder uses the
2-level, 4-level, and 8-level search methods. Fixes failure of the
fate-flac-24-comp-8 test when run using valgrind.
2012-11-08 13:57:34 -05:00
Diego Biurrun
6ca60d4ddd x86: h264_intrapred: port to cpuflags 2012-11-08 18:05:23 +01:00
James Zern
12776d5d2a libvpxenc: Allow enabling constrained quality (CQ) mode
The CQ mode was introduced in libvpx 0.9.6.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 00:01:54 +02:00
Martin Storsjö
ad961726dc libopencore-amr: Check the return value of amr_decode_fix_avctx
This allows getting rid of redundant checks later in the codec
specific init functions.

Move the check to before actually initializing the decoder lib,
to simplify error handling.

This fixes a case of returning a value from a void function, present since
d40dab907.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-07 00:48:50 +02:00
Justin Ruggles
2e76f34387 flacenc: use RICE2 entropy coding mode for 24-bit 2012-11-05 15:32:30 -05:00
Justin Ruggles
13e1ee6c84 flacenc: add 24-bit encoding 2012-11-05 15:32:30 -05:00
Justin Ruggles
799e232490 flacdsp: move lpc encoding from FLAC encoder to FLACDSPContext
Also, templatize the functions for 16-bit and 32-bit sample range. This will
be used for 24-bit FLAC encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles
5ff998a233 flacenc: use uint64_t for bit counts
Needed to avoid integer overflows for 24-bit encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles
e783316322 flacenc: remove wasted trailing 0 bits 2012-11-05 15:32:30 -05:00
Justin Ruggles
6a744d2619 flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
This is much faster than calculating the MD5 one sample at a time.
2012-11-05 15:32:29 -05:00
Diego Biurrun
930e26a3ea x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled
This fixes compilation with --disable-everything and components enabled.
2012-11-05 20:48:43 +01:00
Diego Biurrun
dbb37e7711 x86: PABSW: port to cpuflags 2012-11-05 14:51:10 +01:00
Diego Biurrun
6c104826bd x86: vc1dsp: port to cpuflags 2012-11-05 14:51:10 +01:00
Diego Biurrun
0a7a94f2e5 x86: Refactor PSWAPD fallback implementations and port to cpuflags 2012-11-02 17:05:29 +01:00
Diego Biurrun
9a07c1332c parser: Move Doxygen documentation to the header files 2012-11-02 16:44:23 +01:00
John Stebbins
85f67c4865 PGS subtitles: Expose forced flag
Useful for detection of subtitles displayed during foreign language
scenes.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-02 16:13:35 +01:00
Diego Biurrun
26f01bd106 x86: PMINUB: port to cpuflags 2012-11-02 15:38:15 +01:00
Diego Biurrun
9ce02e14f0 x86: ac3dsp: port to cpuflags 2012-11-02 15:24:50 +01:00
Anton Khirnov
0876c28080 lavc: add some AVPacket doxy. 2012-11-02 07:58:38 +01:00
Ilkka Ollakka
6d1270a0f9 decode_audio3: initialize AVFrame
Same fix and issue as in a25d912dca

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-01 19:43:05 +01:00
Justin Ruggles
5459848b14 ws-snd1: set channel layout 2012-11-01 11:30:04 -04:00
Justin Ruggles
f7b8506573 wmavoice: set channel layout 2012-11-01 11:30:04 -04:00
Justin Ruggles
002097a00b wmapro: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:19 -04:00
Justin Ruggles
2ed40608e9 wma: do not keep private copies of some AVCodecContext fields
channels, sample_rate, bit_rate, and block_align can be used directly from
the AVCodecContext
2012-11-01 11:29:19 -04:00
Justin Ruggles
50a65e7a54 vmdaudio: set channel layout 2012-11-01 11:29:19 -04:00
Justin Ruggles
b5f628e227 twinvq: validate sample rate code
A large invalid value could cause undefined behavior when left-shifted
by 8 later in the function.
2012-11-01 11:29:19 -04:00
Justin Ruggles
335826cf5f twinvq: set channel layout 2012-11-01 11:29:19 -04:00
Justin Ruggles
8cc72ce5a0 twinvq: validate that channels is not <= 0
This could occur due to integer overflow when reading the channel count from
the extradata.
2012-11-01 11:29:19 -04:00
Justin Ruggles
cebea00c8a truespeech: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
523734eb6a sipr: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
4c53f4aed3 shorten: validate that the channel count in the header is not <= 0 2012-11-01 11:29:18 -04:00
Justin Ruggles
4e13e50432 ra288dec: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
6159f64364 ra144dec: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
eb38d8fe92 qdm2: remove unneeded checks for channel count 2012-11-01 11:29:18 -04:00
Justin Ruggles
be2ab8b75a qdm2: make sure channels is not <= 0 and set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
e3d6ab5704 qcelpdec: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
d26701ce2f nellymoserdec: set channels to 1 2012-11-01 11:29:17 -04:00
Justin Ruggles
d40dab907a libopencore-amr: set channel layout for amr-nb or if not set by the user 2012-11-01 11:29:17 -04:00
Justin Ruggles
30f8da29bf libilbc: set channel layout 2012-11-01 11:29:17 -04:00
Justin Ruggles
0fd1ddf155 dpcm: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:17 -04:00
Justin Ruggles
1c7a016153 imc: set channels to 1 instead of validating it 2012-11-01 11:29:17 -04:00
Justin Ruggles
32c7769e5c gsmdec: always set channel layout and sample rate at initialization
Only mono 8kHz is supported.
2012-11-01 11:29:17 -04:00
Justin Ruggles
c5b8acad73 libgsmdec: always set channel layout and sample rate at initialization
Only mono 8kHz is supported.
2012-11-01 11:29:16 -04:00
Justin Ruggles
a346aaf148 g726dec: do not validate sample rate
For decoding it does not really matter what the sample rate is.
2012-11-01 11:29:16 -04:00
Justin Ruggles
e00eb03cd8 g726dec: set channel layout at initialization instead of validating it 2012-11-01 11:29:16 -04:00
Justin Ruggles
99d8686357 flacdec: do not warn on sample rate change 2012-11-01 11:29:16 -04:00
Justin Ruggles
90fcac0e95 flacdec: allow mid-stream channel layout change
Although the libFLAC decoder cannot handle such a change, it is allowed by the
spec and could potentially occur with live streams.
2012-11-01 11:29:16 -04:00
Justin Ruggles
268f8ba112 flacdec: use av_samples_* functions for sample buffer allocation
Also, return an error on allocation failure.
2012-11-01 11:29:16 -04:00
Justin Ruggles
8ac0f6767b dcadec: allow the decoder to change the channel layout mid-stream 2012-11-01 11:29:16 -04:00
Justin Ruggles
93e27f86f1 cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR 2012-11-01 11:29:15 -04:00
Justin Ruggles
8f173ef019 cook: move samples_per_frame from COOKSubpacket to where it is used 2012-11-01 11:29:15 -04:00
Justin Ruggles
7efbba2e36 cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels() 2012-11-01 11:29:15 -04:00
Justin Ruggles
d21b2e4726 cook: reverse a condition so that the code makes more sense 2012-11-01 11:29:15 -04:00
Justin Ruggles
926e9d28f1 cook: remove unneeded COOKContext variable, sample_rate 2012-11-01 11:29:15 -04:00
Justin Ruggles
8aa5b8c5c8 cook: remove unneeded COOKContext variable, bit_rate 2012-11-01 11:29:15 -04:00
Justin Ruggles
3509eee19c cook: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:14 -04:00
Justin Ruggles
a3145d0335 bmvaudio: set channel layout at init() rather than validating it 2012-11-01 11:29:14 -04:00
Justin Ruggles
a38eadf7ed atrac1: do not keep a copy of channel count in the private context 2012-11-01 11:29:14 -04:00
Justin Ruggles
4f56f9c48f dsicinaudio: set channels and channel layout 2012-11-01 11:29:14 -04:00
Justin Ruggles
ec2694d259 g722dec: set channel layout at initialization instead of validating it 2012-11-01 11:29:14 -04:00
Justin Ruggles
ee0e9678e7 amrwbdec: set channels, channel_layout, and sample_rate
Only mono 16kHz is supported.
2012-11-01 11:29:14 -04:00
Justin Ruggles
b24a4449a5 amrnbdec: set channels, channel_layout, and sample_rate
Only mono 8kHz is supported.
2012-11-01 11:29:14 -04:00
Justin Ruggles
a4202003b2 dca_parser: allow the parser to change the sample rate 2012-11-01 11:29:13 -04:00
Justin Ruggles
0366664ef9 lavc: check channel count after decoder init
Ensures the decoder did not set channel count to an insanely high value
during initialization, which could cause large memory usage when it tries to
get a buffer during decoding.
2012-11-01 11:29:13 -04:00
Justin Ruggles
bb6941af2a lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders 2012-11-01 11:29:13 -04:00
Diego Biurrun
c37322e68c x86: Move optimization suffix to end of function names
This simplifies cpuflags porting.
2012-10-31 18:21:55 +01:00
Diego Biurrun
fa8fcab1e0 x86: h264_chromamc_10bit: drop pointless PAVG %define
It is only used in one place so there is no need for the abstraction.
2012-10-31 18:21:55 +01:00
Diego Biurrun
d8eda37080 x86: mmx2 ---> mmxext in function names 2012-10-31 17:53:57 +01:00
Diego Biurrun
5707af8d0b aacdec: Drop some unused function arguments 2012-10-31 10:54:52 +01:00
Diego Biurrun
be2c456e96 x86: fmtconvert: Refactor cvtps2pi emulation through cpuflags 2012-10-31 01:05:03 +01:00
Diego Biurrun
be923ed659 x86: fmtconvert: port to cpuflags 2012-10-31 01:05:03 +01:00
Diego Biurrun
588fafe7f3 x86: MMX2 ---> MMXEXT in macro names 2012-10-31 01:04:55 +01:00
Diego Biurrun
652f518594 x86: mmx2 ---> mmxext in comments and messages 2012-10-31 00:37:42 +01:00
Diego Biurrun
04581c8c77 x86: yasm: Use complete source path for macro helper %includes
This is more consistent with the way we handle C #includes and
it simplifies the build system.
2012-10-31 00:37:42 +01:00
Diego Biurrun
6860b4081d x86: include x86inc.asm in x86util.asm
This is necessary to allow refactoring some x86util macros with cpuflags.
2012-10-31 00:37:42 +01:00
Martin Storsjö
ab9545a290 cng: Reindent some incorrectly indented lines
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:29 +02:00
Martin Storsjö
6b68223d31 cngdec: Allow flushing the decoder
After a flush, don't average the output envelope and energy with
previous iterations.

Also start directly from the target values for the first iteration
at startup.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:25 +02:00
Martin Storsjö
036e6c37d3 cngdec: Make the dbov variable have the right unit
Previously the unit of the variable was Bov, not dBov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:21 +02:00
Martin Storsjö
cafefd889b cngdec: Fix the memset size to cover the full array
This was a leftover from previous iterations of the code, where the
refl coef arrays were statically allocated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:16 +02:00
Martin Storsjö
9b50d20cd2 cngdec: Update the LPC coefficients after averaging the reflection coefficients
I somehow messed up the placement of this one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:12 +02:00
Luca Barbato
7658295ba3 pixfmt: support more yuva formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-30 12:02:42 +01:00
Ronald S. Bultje
95c89da36e Use ptrdiff_t instead of int for intra pred "stride" function parameter.
This way, SIMD-optimized functions don't have to sign-extend their
stride argument manually to be able to do pointer arithmetic.
2012-10-29 17:49:13 -07:00
Ronald S. Bultje
bad8e33dc9 x86: use PRED4x4/8x8/8x8L/16x16 macros to declare intrapred prototypes. 2012-10-29 17:48:23 -07:00
Ronald S. Bultje
c285edd06e Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
Replace INIT_AVX by INIT_XMM avx. Port the whole file to use cpuflag
based function declarations. Remove (now unused) cputype argument in
function declaration macros. Change function prototypes to have mmx2
instead of mmxext as suffix, since that's required by cpuflags.
2012-10-29 14:10:51 -07:00
Martin Storsjö
9b500b8f6c avcodec: Add a RFC 3389 comfort noise codec
This isn't too useful as a normal codec, but can be used in
voip style applications. The decoder updates the noise
generator parameters when a packet is given to it for decoding,
but if called with an empty packet, it generates more noise
according to the last parameters.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 22:00:43 +02:00
Martin Storsjö
8b25a20efb lpc: Add a function for calculating reflection coefficients from samples
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 21:53:16 +02:00
Justin Ruggles
39ef66f530 lpc: Add a function for calculating reflection coefficients from autocorrelation coefficients
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 21:53:13 +02:00
Anton Khirnov
bff5e5f8b3 indeo3: remove duplicate capabilities line. 2012-10-29 20:04:56 +01:00
Diego Biurrun
72c758f1fd aacenc: Drop some unused function arguments 2012-10-29 18:27:54 +01:00
Anton Khirnov
f174fbac3c lavc: add CODEC_CAP_DR1 to all video decoders missing them 2012-10-29 09:51:23 +01:00
Mans Rullgard
4471a24207 vp8: fix memset() crossing array boundary
Indexing across array boundaries is not allowed by C99.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 17:02:46 +01:00
Mans Rullgard
c4cccc8d3f h264: fix invalid pointer arithmetic
Subtracting a (positive) value from the address of an array violates
C99 section 6.5.6:

  If both the pointer operand and the result point to elements of the
  same array object, or one past the last element of the array object,
  the evaluation shall not produce an overflow; otherwise, the
  behavior is undefined.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 17:02:46 +01:00
Mans Rullgard
50be207759 amrwbdec: fix invalid pointer arithmetic
Subtracting a (positive) value from the address of an array violates
C99 section 6.5.6:

  If both the pointer operand and the result point to elements of the
  same array object, or one past the last element of the array object,
  the evaluation shall not produce an overflow; otherwise, the
  behavior is undefined.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 17:02:45 +01:00
Diego Biurrun
87cdd7c694 ivi_common: Drop unused function parameter from decode_band() 2012-10-26 18:28:38 +02:00
Diego Biurrun
707f58f515 cook: Remove some silly Doxygen comments 2012-10-26 18:28:38 +02:00
Diego Biurrun
8a61ba0e81 cook: Remove senseless maybe_reformat_buffer32() function 2012-10-26 18:28:38 +02:00
Diego Biurrun
f23b4a0682 cook: cosmetics: Better names for joint_decode() function parameters 2012-10-26 18:28:38 +02:00
Diego Biurrun
20015379a4 cook: cosmetics: Better name for ccpl COOKSubpacket member 2012-10-26 18:28:38 +02:00
Janne Grunau
154ff81870 h263: avoid memcpys over array bound in motion vector caching for obmc
Fixes CID602232.
2012-10-26 17:38:07 +02:00
Luca Barbato
22f7942fe7 ffv1: set the range coder state in decode_slice_header 2001-01-01 01:06:41 +01:00
Diego Biurrun
5bac2d0c30 avutil: Move memcpy_backptr() to mem.c
The function is used elsewhere and does not belong with the LZO code.
2012-10-25 11:36:57 +02:00
Anton Khirnov
5a9567631a g.723.1: add missing CODEC_CAP_DR1 2012-10-24 08:46:45 +02:00
Anton Khirnov
1bc64c2814 lavc: initialize output AVFrame before decoding.
Avoids memleaks with audio when extended_data is nontrivial and the user
doesn't reset the frame.
Shouldn't have any effect for video for now, but might be useful in the
future.
2012-10-24 08:46:45 +02:00
Justin Ruggles
c68317ebbe lavc: fix documentation for AVCodecContext.delay 2012-10-23 14:35:27 -04:00
Justin Ruggles
44d854a518 atrac3: return an error if extradata_size is not a specific known size
Also fixes 3 compiler warnings about using uninitialized variables.
2012-10-23 14:35:27 -04:00
Justin Ruggles
a5ef830b12 lavc: use the correct API version guard macro for avcodec_encode_audio() 2012-10-23 14:35:27 -04:00
Mans Rullgard
a153e45b95 dfa: use av_memcpy_backptr() where previously impossible
Since the requirement for output padding has been lifted, we can
use av_memcpy_backptr() here as well.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 18:57:24 +01:00
Diego Biurrun
e831b3b852 av_memcpy_backptr: Drop no longer necessary malloc padding
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 18:57:24 +01:00
Diego Biurrun
330b864cda dsputil: Replace AV_WNxx(AV_RNxx()) combinations by AV_COPYxxU 2012-10-23 16:54:17 +02:00
Diego Biurrun
aa91fe8091 dxtory: Replace AV_WN16A(AV_RN16A()) combination by AV_COPY16 2012-10-23 16:53:42 +02:00
Luca Barbato
9ab0874ea8 mp3: properly forward mp_decode_frame errors
The function can return either a parsing error or a memory management
error.
2012-10-23 14:22:16 +02:00
Luca Barbato
0c03cc6838 mp3: exit on parsing error in mp_decode_frame
Properly forward mp_decode_layer3 errors, mp_decode_layer1 and
mp_decode_layer2 do not return errors.

Based on a patch by Michael Niedermayer.
2012-10-23 14:22:16 +02:00
Mans Rullgard
fab0a8b2c6 libm: add fallbacks for various single-precision functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:21 +01:00
Michael Niedermayer
ec444c84cf mpegaudiodec: Fix buffer handling on random access 2012-10-23 10:52:25 +02:00
Diego Biurrun
2f17f265ed mpegaudio: Refactor mp3on4 flush function 2012-10-23 10:52:25 +02:00
Diego Biurrun
8f4c414df6 Improve wording and spelling of av_log_missing_feature messages. 2012-10-23 10:28:40 +02:00
Anton Khirnov
c6b25d1d5e Revert "avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility"
This reverts commit d15c21e5fa.

After the major bump this is no longer necessary.
2012-10-23 07:33:05 +02:00
Justin Ruggles
a1f4cd371a atrac3: replace a calculation with FFALIGN()
This allocates 4 bytes less than the previous code if avctx->block_align is
a multiple of 4, but the extra 4 bytes is not really needed.
2012-10-22 10:10:08 -04:00
Justin Ruggles
808686fc1e atrac3: remove unused ATRAC3Context field, sample_rate 2012-10-22 10:10:08 -04:00
Justin Ruggles
89a6c32bc1 atrac3: use sizeof(variable) instead of sizeof(type) 2012-10-22 10:10:08 -04:00
Justin Ruggles
327747de15 atrac3: simplify MDCT window calculation 2012-10-22 10:10:08 -04:00
Justin Ruggles
5d1007f74d atrac3: initialize static tables in AVCodec.init_static_data() 2012-10-22 10:10:08 -04:00
Justin Ruggles
78edce3f19 atrac3: separate window initialization from IMDCT initialization 2012-10-22 10:10:08 -04:00
Justin Ruggles
c51311b907 atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used 2012-10-22 10:10:08 -04:00
Justin Ruggles
7e76f27081 atrac3: remove unused ATRAC3Context field, bit_rate 2012-10-22 10:10:07 -04:00
Justin Ruggles
a2664c91fb atrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used 2012-10-22 10:10:07 -04:00
Justin Ruggles
7c1f93afe6 atrac3: remove unused ATRAC3Context field, samples_per_channel 2012-10-22 10:10:07 -04:00
Justin Ruggles
cdd0e0de81 atrac3: use AVCodecContext.block_align instead of keeping a private copy 2012-10-22 10:10:07 -04:00
Justin Ruggles
64ebbb8f89 atrac3: move the 'delay' field from ATRAC3Context to where it is used 2012-10-22 10:10:07 -04:00