Commit Graph

15911 Commits

Author SHA1 Message Date
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