1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-13 12:55:05 +02:00
Commit Graph

15962 Commits

Author SHA1 Message Date
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
Justin Ruggles
8ccf545b95 libopencore-amrnbenc: use AVCodec.encode2() 2012-03-21 12:49:36 -04:00
Justin Ruggles
330d9d1b50 ra144enc: use AVCodec.encode2() 2012-03-21 12:49:36 -04:00
Justin Ruggles
f090428234 nellymoserenc: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles
32173df3d2 roqaudioenc: use AVCodec.encode2()
The first frame pts must be saved until we have 8 frames since RoQ audio
requires 8 frames in the first packet.
2012-03-21 12:49:35 -04:00
Justin Ruggles
b03dcf07f6 libspeex: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles
57a52f258e libvo_amrwbenc: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles
db440fa12d libvo_aacenc: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles
27bacfeb57 wmaenc: use AVCodec.encode2() 2012-03-21 12:49:32 -04:00
Justin Ruggles
b0f75ba272 mpegaudioenc: use AVCodec.encode2()
Update FATE references due to encoder delay.
2012-03-20 18:56:22 -04:00
Justin Ruggles
3d853d7ab3 libmp3lame: use AVCodec.encode2() 2012-03-20 18:56:18 -04:00
Justin Ruggles
1987a940b7 libgsmenc: use AVCodec.encode2() 2012-03-20 18:55:39 -04:00
Justin Ruggles
d1afb2f94e libfaac: use AVCodec.encode2()
Encoder output is delayed by several frames, so we keep a queue of input
frame timing info to match up with corresponding output packets.
2012-03-20 18:55:36 -04:00
Justin Ruggles
59041fd053 g726enc: use AVCodec.encode2() 2012-03-20 18:47:23 -04:00
Justin Ruggles
bb03b6f7b1 g722enc: use AVCodec.encode2()
FATE reference updated due timestamp rounding because of resampling from
44100 Hz to 16000 Hz in avconv.
2012-03-20 18:47:23 -04:00
Justin Ruggles
910bdb9a42 flacenc: use AVCodec.encode2() 2012-03-20 18:47:19 -04:00
Justin Ruggles
24e74f0a0f adpcmenc: update to AVCodec.encode2() 2012-03-20 18:46:57 -04:00
Justin Ruggles
aa872af5e3 ac3enc: update to AVCodec.encode2()
Update FATE references due to encoder delay.
2012-03-20 18:46:56 -04:00
Justin Ruggles
ad95307f92 aacenc: use AVCodec.encode2() 2012-03-20 18:46:49 -04:00
Justin Ruggles
4bf64961a9 avcodec: add code for a frame queue for use by audio encoders with delay
This simplifies matching of timestamps between input frames and output
packets.
2012-03-20 16:04:21 -04:00
Justin Ruggles
f63412fc74 oggdec: output correct timestamps for Vorbis
Takes encoder delay into account by comparing first the coded page
duration with the calculated page duration. Handles last packet duration
if needed, also by comparing coded duration with calculated duration.
Also does better handling of timestamp generation for packets in the
first page for streamed ogg files where the start time is not
necessarily zero.
2012-03-20 14:39:57 -04:00
Justin Ruggles
a1977e0103 lavc: shrink encoded audio packet size after encoding. 2012-03-20 14:12:54 -04:00
Kostya Shishkov
1d10afd581 bink: fix typo in FFALIGN() argument 2012-03-20 18:57:51 +01:00
Kostya Shishkov
8ae28ac0f3 bink: align plane width to 8 when calculating bundle sizes
This fixes decoding of Bink files with non-multiple-of-16 width.
2012-03-20 16:33:57 +01:00
Anton Khirnov
4fea8959d8 doc/avconv: remove entries for AVOptions.
Documentation for those will be generated automatically.
2012-03-20 07:09:54 +01:00
Anton Khirnov
5626697104 Move AVFormatContext/AVCodecContext option tables to separate files.
This will allow us to automatically generate manpages for them.
2012-03-20 07:09:18 +01:00
Aaron Colwell
30011bf201 vp8: avoid race condition on segment map.
This change avoids accessing the segment map of the previous frame if
segmentation is not enabled for the current frame. The caller of
decode_mb_mode() only calls ff_thread_await_progress() on the reference
segmentation index array if segmentation is enabled, so Chromium's TSAN
will report a race when accessing this data while segmentation is not
enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-19 13:49:34 -07:00