OSDN Git Service

android-x86/external-ffmpeg.git
8 years agovaapi_h264: Convert to use the new VAAPI hwaccel code
Mark Thompson [Sat, 6 Aug 2016 17:19:32 +0000 (18:19 +0100)]
vaapi_h264: Convert to use the new VAAPI hwaccel code

8 years agolavc: Rewrite VAAPI decode infrastructure
Mark Thompson [Sat, 6 Aug 2016 17:18:40 +0000 (18:18 +0100)]
lavc: Rewrite VAAPI decode infrastructure

Moves much of the setup logic for VAAPI decoding into lavc; the user
now need only provide the hw_frames_ctx.

8 years agowmavoice: Simplify GetBitContext initialization
Diego Biurrun [Fri, 26 Aug 2016 12:56:01 +0000 (14:56 +0200)]
wmavoice: Simplify GetBitContext initialization

8 years agoChangelog: Mention mov with multiple stsd
Vittorio Giovara [Thu, 25 Aug 2016 15:59:59 +0000 (11:59 -0400)]
Changelog: Mention mov with multiple stsd

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoHigh Definition Compatible Digital (HDCD) decoder filter, using libhdcd
Burt P [Fri, 26 Aug 2016 14:12:30 +0000 (16:12 +0200)]
High Definition Compatible Digital (HDCD) decoder filter, using libhdcd

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoavprobe: Fix memory leak
Vittorio Giovara [Thu, 21 Jul 2016 13:47:47 +0000 (15:47 +0200)]
avprobe: Fix memory leak

After init_opts() there needs to be an uninit_opts() call
to free the swscale context and other buffers.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agomov: Remove old b-frame/video delay heuristic
Derek Buitenhuis [Fri, 26 Aug 2016 13:30:07 +0000 (14:30 +0100)]
mov: Remove old b-frame/video delay heuristic

This was added before edts support existed, and is no longer
valid.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agomov: Remove ancient heuristic hack
Derek Buitenhuis [Fri, 26 Aug 2016 13:30:06 +0000 (14:30 +0100)]
mov: Remove ancient heuristic hack

This breaks files with legitimate single-entry edit lists,
and the hack, introduced in f03a081df09f9c4798a17d7e24446ed47924b11b,
has no link to any known sample in its commit message.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agolibvpx: Cast a pointer to const to squelch a warning
Diego Biurrun [Wed, 24 Aug 2016 15:00:11 +0000 (17:00 +0200)]
libvpx: Cast a pointer to const to squelch a warning

libavcodec/libvpxdec.c:100:57: warning: passing argument 3 of 'av_image_copy' from incompatible pointer type
         av_image_copy(picture->data, picture->linesize, img->planes,
libavutil/imgutils.h:116:6: note: expected 'const uint8_t **' but argument is of type 'unsigned char **'
 void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],

8 years agovp56: Separate VP5 and VP6 dsp initialization
Diego Biurrun [Wed, 24 Aug 2016 10:30:15 +0000 (12:30 +0200)]
vp56: Separate VP5 and VP6 dsp initialization

VP5 has no arch-specific optimizations (nor will it get some in the
future), so it makes no sense to try to share dsp init code with VP6.

8 years agoprores: Change type of stride parameters to ptrdiff_t
Diego Biurrun [Wed, 24 Aug 2016 09:52:10 +0000 (11:52 +0200)]
prores: Change type of stride parameters to ptrdiff_t

This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.

Also adjust parameter names to be "linesize" everywhere.

8 years agocavs: Change type of stride parameters to ptrdiff_t
Diego Biurrun [Tue, 23 Aug 2016 22:18:41 +0000 (00:18 +0200)]
cavs: Change type of stride parameters to ptrdiff_t

ptrdiff_t is the correct type for array strides and similar.

8 years agovp8: Update some assembly comments left unchanged in bd66f073fe7286bd3c
Diego Biurrun [Wed, 24 Aug 2016 11:50:28 +0000 (13:50 +0200)]
vp8: Update some assembly comments left unchanged in bd66f073fe7286bd3c

8 years agovp8: Change type of stride parameters to ptrdiff_t
Diego Biurrun [Tue, 23 Aug 2016 21:26:35 +0000 (23:26 +0200)]
vp8: Change type of stride parameters to ptrdiff_t

ptrdiff_t is the correct type for array strides and similar.

8 years agovp56: Change type of stride parameters to ptrdiff_t
Diego Biurrun [Tue, 23 Aug 2016 21:23:45 +0000 (23:23 +0200)]
vp56: Change type of stride parameters to ptrdiff_t

This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.

8 years agovp3: Change type of stride parameters to ptrdiff_t
Diego Biurrun [Tue, 23 Aug 2016 21:19:30 +0000 (23:19 +0200)]
vp3: Change type of stride parameters to ptrdiff_t

This avoids SIMD-optimized functions having to sign-extend their
stride argument manually to be able to do pointer arithmetic.

Also adjust parameter names to be "stride" everywhere.

8 years agodoc: Document FATE option HWACCEL
Luca Barbato [Mon, 15 Aug 2016 17:24:05 +0000 (19:24 +0200)]
doc: Document FATE option HWACCEL

8 years agoav1: Add codec_id and basic demuxing support
Luca Barbato [Sun, 24 Jul 2016 19:17:10 +0000 (21:17 +0200)]
av1: Add codec_id and basic demuxing support

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agortpdec_mpeg4: validate fmtp fields
Luca Barbato [Fri, 19 Aug 2016 16:35:33 +0000 (18:35 +0200)]
rtpdec_mpeg4: validate fmtp fields

8 years agoconfigure: Set __MSVCRT_VERSION__to 0x0700 for MinGW
Diego Biurrun [Thu, 4 Aug 2016 15:01:03 +0000 (17:01 +0200)]
configure: Set __MSVCRT_VERSION__to 0x0700 for MinGW

This exposes some required functionality like _aligned_malloc() in the
MinGW system headers, thus obviating the need for the memalign hack.

8 years agomss12: validate display dimensions
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
mss12: validate display dimensions

The code currently reads the coded dimensions from the extradata, but
expects the display dimensions to be set by the caller, and does not
check that they are compatible (i.e. that the displayed size is smaller
than the coded size).

Make sure that when the display dimensions are set, they are also valid.
Fixes possible invalid memory access.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agovc1: check that slices have a positive height
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
vc1: check that slices have a positive height

Fixes possible invalid reads.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agopcx: use the bytestream2 API for reading from input
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
pcx: use the bytestream2 API for reading from input

Fixes possible invalid reads.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agopcx: check that the packet is large enough before reading the header
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
pcx: check that the packet is large enough before reading the header

Fixes possible invalid reads.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agopcx: properly pad the scanline
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
pcx: properly pad the scanline

It is passed to the get_bits API, which requires buffers to be padded.

Fixes possible invalid reads.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agocook: use the bytestream2 API for reading extradata
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
cook: use the bytestream2 API for reading extradata

Fixes possible invalid reads in corrupted files.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agoqpeg: fix an off by 1 error in the MV check
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
qpeg: fix an off by 1 error in the MV check

height - me_y is the line from which we read, so it must be strictly
smaller than the frame height. Fixes possible invalid reads in corrupted
files.

Also, use a proper context for logging the error.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agoalac: do not return success if nothing was decoded
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
alac: do not return success if nothing was decoded

If we encounter an END element before anything is decoded, we would
return success even though the output frame has not been allocated,
which is invalid.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agovmnc: check that subrectangles fit into their containing rectangles
Anton Khirnov [Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)]
vmnc: check that subrectangles fit into their containing rectangles

Fixes possible invalid writes with corrupted files.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8 years agogolomb: Drop disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 12:52:20 +0000 (14:52 +0200)]
golomb: Drop disabled cruft

8 years agosimple_idct: arm: Drop disabled code variant
Diego Biurrun [Mon, 1 Aug 2016 18:57:30 +0000 (20:57 +0200)]
simple_idct: arm: Drop disabled code variant

8 years agosimple_idct: x86: Drop disabled IDCT implementation
Diego Biurrun [Mon, 1 Aug 2016 18:50:48 +0000 (20:50 +0200)]
simple_idct: x86: Drop disabled IDCT implementation

This gem has been disabled since 2001.

8 years agodvbsubdec: Remove disabled, near-duplicate debug code
Diego Biurrun [Tue, 2 Aug 2016 09:22:11 +0000 (11:22 +0200)]
dvbsubdec: Remove disabled, near-duplicate debug code

8 years agotimefilter: test: Drop some disabled debug cruft
Diego Biurrun [Mon, 1 Aug 2016 18:53:33 +0000 (20:53 +0200)]
timefilter: test: Drop some disabled debug cruft

8 years agompegvideo: Kill some disabled code
Diego Biurrun [Mon, 1 Aug 2016 17:56:28 +0000 (19:56 +0200)]
mpegvideo: Kill some disabled code

8 years agomsmpeg4: Drop disabled debug cruft
Diego Biurrun [Sat, 30 Jul 2016 13:30:46 +0000 (15:30 +0200)]
msmpeg4: Drop disabled debug cruft

8 years agomathops: Drop disabled alternative mid_pred() implementation
Diego Biurrun [Mon, 1 Aug 2016 18:15:07 +0000 (20:15 +0200)]
mathops: Drop disabled alternative mid_pred() implementation

8 years agonsv: Drop disabled cruft
Diego Biurrun [Mon, 1 Aug 2016 18:39:25 +0000 (20:39 +0200)]
nsv: Drop disabled cruft

8 years agomjpegdec: Drop disabled code
Diego Biurrun [Mon, 1 Aug 2016 18:21:04 +0000 (20:21 +0200)]
mjpegdec: Drop disabled code

8 years agofaan(i)dct: Kill some disabled code
Diego Biurrun [Mon, 1 Aug 2016 17:59:58 +0000 (19:59 +0200)]
faan(i)dct: Kill some disabled code

8 years agowc3movie: Drop unused cruft
Diego Biurrun [Sat, 30 Jul 2016 12:11:05 +0000 (14:11 +0200)]
wc3movie: Drop unused cruft

8 years agoffv1: Remove broken disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 13:00:32 +0000 (15:00 +0200)]
ffv1: Remove broken disabled cruft

8 years agoh264: Kill broken disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 11:49:08 +0000 (13:49 +0200)]
h264: Kill broken disabled cruft

8 years agoaac: Drop broken cruft
Diego Biurrun [Sat, 30 Jul 2016 11:59:51 +0000 (13:59 +0200)]
aac: Drop broken cruft

8 years agojfdct: Kill broken cruft
Diego Biurrun [Sat, 30 Jul 2016 11:57:31 +0000 (13:57 +0200)]
jfdct: Kill broken cruft

8 years agorm: Drop broken disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 11:51:23 +0000 (13:51 +0200)]
rm: Drop broken disabled cruft

8 years agoroqvideoenc: Drop broken disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 11:50:58 +0000 (13:50 +0200)]
roqvideoenc: Drop broken disabled cruft

8 years agopnm_parser: Drop broken disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 11:50:42 +0000 (13:50 +0200)]
pnm_parser: Drop broken disabled cruft

8 years agowma: Kill non-compiling disabled cruft
Diego Biurrun [Tue, 2 Aug 2016 10:01:12 +0000 (12:01 +0200)]
wma: Kill non-compiling disabled cruft

8 years agoswscale: Kill non-compiling disabled cruft
Diego Biurrun [Sat, 30 Jul 2016 11:47:34 +0000 (13:47 +0200)]
swscale: Kill non-compiling disabled cruft

8 years agompeg4videoenc: Kill non-compiling disabled cruft
Diego Biurrun [Tue, 2 Aug 2016 10:00:03 +0000 (12:00 +0200)]
mpeg4videoenc: Kill non-compiling disabled cruft

8 years agorangecoder: Kill non-compiling disabled cruft
Diego Biurrun [Tue, 2 Aug 2016 10:02:21 +0000 (12:02 +0200)]
rangecoder: Kill non-compiling disabled cruft

8 years agomathematics: Kill non-compiling disabled cruft
Diego Biurrun [Fri, 29 Jul 2016 21:24:27 +0000 (23:24 +0200)]
mathematics: Kill non-compiling disabled cruft

8 years agovaapi_vc1: Remove redundant version check
Mark Thompson [Sat, 6 Aug 2016 20:35:13 +0000 (21:35 +0100)]
vaapi_vc1: Remove redundant version check

The lowest supported VAAPI version is 0.34 (checked at configure
time), so this test is no longer needed.

8 years agovaapi_vc1: Constify pointers
Mark Thompson [Sat, 6 Aug 2016 20:34:04 +0000 (21:34 +0100)]
vaapi_vc1: Constify pointers

8 years agovaapi_mpeg2: Constify pointers
Mark Thompson [Sat, 6 Aug 2016 15:40:14 +0000 (16:40 +0100)]
vaapi_mpeg2: Constify pointers

8 years agovaapi_h264: Constify pointers
Mark Thompson [Sat, 6 Aug 2016 15:39:57 +0000 (16:39 +0100)]
vaapi_h264: Constify pointers

8 years agohwcontext_vaapi: Try the first render node as the default DRM device
Mark Thompson [Thu, 28 Jul 2016 22:28:30 +0000 (23:28 +0100)]
hwcontext_vaapi: Try the first render node as the default DRM device

If no string argument is supplied when av_hwdevice_ctx_create() is
called to create a VAAPI device, we currently only try the default
X11 display (that is, $DISPLAY) to find a device, and will therefore
fail in the absence of an X server to connect to.  Change the logic
to also look for a device via the first DRM render node (that is,
"/dev/dri/renderD128"), which is probably the right thing to use in
most simple configurations which only have one DRM device.

8 years agoPrepare for 12_alpha1 Release
Sean McGovern [Fri, 12 Aug 2016 20:37:15 +0000 (16:37 -0400)]
Prepare for 12_alpha1 Release

8 years agoavconv: Make sure that inputless filtergraphs are configured
Luca Barbato [Wed, 3 Aug 2016 02:21:41 +0000 (04:21 +0200)]
avconv: Make sure that inputless filtergraphs are configured

Unbreak `avconv -filter_complex testsrc`.

Regression introduced in a3a0230a9870b9018dc7415ae5872784d524cfe5

8 years agoavconv: Check the fifo allocation
Luca Barbato [Sun, 24 Jul 2016 22:33:01 +0000 (00:33 +0200)]
avconv: Check the fifo allocation

8 years agovp9: reindent after last commit
Anton Khirnov [Sat, 6 Aug 2016 08:07:53 +0000 (10:07 +0200)]
vp9: reindent after last commit

8 years agovp9: add frame threading
Ronald S. Bultje [Tue, 2 Aug 2016 05:55:31 +0000 (07:55 +0200)]
vp9: add frame threading

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9: allocate 'b', 'block/uvblock' and 'eob/uveob' dynamically.
Ronald S. Bultje [Sat, 23 Nov 2013 17:10:12 +0000 (12:10 -0500)]
vp9: allocate 'b', 'block/uvblock' and 'eob/uveob' dynamically.

This will be needed for frame threading.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9: split last/cur_frame from the reference buffers.
Ronald S. Bultje [Sat, 23 Nov 2013 15:27:18 +0000 (10:27 -0500)]
vp9: split last/cur_frame from the reference buffers.

We need more information from last/cur_frame than from reference
buffers, so we can use a simplified structure for reference buffers,
and then store mvs and segmentation map information in last/cur.

This prepares the decoder for frame threading support.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoh264_direct: use the reference mask from the actual reference
Anton Khirnov [Tue, 2 Aug 2016 08:43:39 +0000 (10:43 +0200)]
h264_direct: use the reference mask from the actual reference

Not from the underlying frame. Fixes races with frame threading in
field-coded files, where decoding would wait for the wrong field (e.g.
random failures in mixed-nal-coding).

Bug-Id: 954

8 years agolavc: free buffer_frame/pkt on avcodec_open2() failure
Anton Khirnov [Mon, 8 Aug 2016 11:32:54 +0000 (13:32 +0200)]
lavc: free buffer_frame/pkt on avcodec_open2() failure

Fixes memory leaks in some FATE tests.

8 years agobuffer: fix av_buffer_pool_init2() documentation
Anton Khirnov [Wed, 3 Aug 2016 07:51:06 +0000 (09:51 +0200)]
buffer: fix av_buffer_pool_init2() documentation

A non-existent av_buffer_pool_can_uninit() function is mentioned instead
of av_buffer_pool_uninit(). Also, this function is to be called by the
caller, not the pool itself.

8 years agoaiff: Skip padding byte for odd-sized chunks
Diego Biurrun [Mon, 8 Aug 2016 19:06:03 +0000 (21:06 +0200)]
aiff: Skip padding byte for odd-sized chunks

Bug-Id: 660

8 years agovp9: make mv bounds 32bit.
Ronald S. Bultje [Tue, 7 Jan 2014 12:24:03 +0000 (07:24 -0500)]
vp9: make mv bounds 32bit.

The frame dimensions are 16bit, so the mv bounds can easily overflow
int16 for large videos.

Bug-Id: Handbrake/46
CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agobuffer: fix av_buffer_realloc() when the data is offset wrt buffer start
Anton Khirnov [Tue, 2 Aug 2016 19:16:44 +0000 (21:16 +0200)]
buffer: fix av_buffer_realloc() when the data is offset wrt buffer start

In such a case behave as if the buffer was not reallocatable -- allocate a
new one and copy the data (preserving just the part described by the
reference passed to av_buffer_realloc).

CC: libav-stable@libav.org
Reported-By: wm4 <nfxjfg@googlemail.com>
8 years agocheckasm: add vp9 MC tests.
Ronald S. Bultje [Tue, 15 Sep 2015 20:41:29 +0000 (16:41 -0400)]
checkasm: add vp9 MC tests.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9mc/x86: sse2 MC assembly.
Ronald S. Bultje [Mon, 15 Dec 2014 01:13:24 +0000 (20:13 -0500)]
vp9mc/x86: sse2 MC assembly.

Also a slight change to the ssse3 code, which prevents a theoretical
overflow in the sharp filter.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9mc/x86: add AVX and AVX2 MC
James Almer [Tue, 23 Sep 2014 00:55:13 +0000 (21:55 -0300)]
vp9mc/x86: add AVX and AVX2 MC

Roughly 25% faster MC than ssse3 for blocksizes 32 and 64.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9mc/x86: rename ff_* to ff_vp9_*
Clément Bœsch [Fri, 28 Mar 2014 21:33:51 +0000 (22:33 +0100)]
vp9mc/x86: rename ff_* to ff_vp9_*

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9mc/x86: rename ff_avg[48]_sse to ff_avg[48]_mmxext
James Almer [Sat, 18 Jan 2014 05:29:22 +0000 (02:29 -0300)]
vp9mc/x86: rename ff_avg[48]_sse to ff_avg[48]_mmxext

pavgb is an sse integer instruction, so the mmxext flag is enough

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9mc/x86: simplify a few inits.
Clément Bœsch [Wed, 15 Jan 2014 21:35:43 +0000 (22:35 +0100)]
vp9mc/x86: simplify a few inits.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9mc/x86: add 16px functions (64bit only).
Ronald S. Bultje [Tue, 24 Dec 2013 21:17:03 +0000 (16:17 -0500)]
vp9mc/x86: add 16px functions (64bit only).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovp9/x86: rename vp9dsp to vp9mc
Anton Khirnov [Sat, 30 Jul 2016 17:21:57 +0000 (19:21 +0200)]
vp9/x86: rename vp9dsp to vp9mc

It only contains the MC SIMD, other SIMD will go into different files.

8 years agolavc: align the linesize to 32 when AVX is enabled
Anton Khirnov [Sat, 30 Jul 2016 18:54:42 +0000 (20:54 +0200)]
lavc: align the linesize to 32 when AVX is enabled

8 years agolavu: add LOCAL_ALIGNED_32
James Almer [Thu, 24 Apr 2014 02:53:36 +0000 (23:53 -0300)]
lavu: add LOCAL_ALIGNED_32

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agox86: deduplicate some constants
Christophe Gisquet [Wed, 6 Aug 2014 07:43:39 +0000 (07:43 +0000)]
x86: deduplicate some constants

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoh264dec: reset nb_slice_ctx_queued for hwaccel decoding
Anton Khirnov [Mon, 1 Aug 2016 05:42:30 +0000 (07:42 +0200)]
h264dec: reset nb_slice_ctx_queued for hwaccel decoding

Fixes hwaccel decoding of files with multiple slices.

Found-By: Mark Thompson <sw@jkqxz.net>
8 years agom4vdec: Check for non-startcode 00 00 00 sequences in probe
Michael Niedermayer [Sun, 7 Sep 2014 14:39:39 +0000 (16:39 +0200)]
m4vdec: Check for non-startcode 00 00 00 sequences in probe

This makes the m4v detection less trigger-happy.

Bug-Id: 949
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agosbrdsp: Move a misplaced #endif directive to the right spot
Diego Biurrun [Sat, 30 Jul 2016 12:33:50 +0000 (14:33 +0200)]
sbrdsp: Move a misplaced #endif directive to the right spot

8 years agodvbsubdec: Use NULL instead of 0 as pointer value
Diego Biurrun [Mon, 1 Aug 2016 19:19:09 +0000 (21:19 +0200)]
dvbsubdec: Use NULL instead of 0 as pointer value

8 years agoRevert "libavutil: Use an intermediate variable in AV_COPY*U"
Martin Storsjö [Mon, 1 Aug 2016 06:04:43 +0000 (09:04 +0300)]
Revert "libavutil: Use an intermediate variable in AV_COPY*U"

This reverts commit 014773b66bdff4de24f384066d1a85d2a5bb6774.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, i.e. doing exactly the same change as was done
in the AV_COPY*U macros, so this change is no longer necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoRevert "Don't use expressions with side effects in macro parameters"
Martin Storsjö [Mon, 1 Aug 2016 06:04:33 +0000 (09:04 +0300)]
Revert "Don't use expressions with side effects in macro parameters"

This reverts commit 25bacd0a0c32ae682e6f411b1ac9020aeaabca72.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, so revert to the more readable version of these.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agointreadwrite: Use the __unaligned keyword on MSVC for ARM and x86_64
Martin Storsjö [Mon, 1 Aug 2016 07:04:42 +0000 (10:04 +0300)]
intreadwrite: Use the __unaligned keyword on MSVC for ARM and x86_64

AV_WN64 is meant for unaligned data, but the existing av_alias* unions
(without a definition for the av_alias attribute - we don't have one
for MSVC) indicate to the compiler that they would have sufficient
alignment for normal access, i.e. the compiler is free to assume
8 byte alignment.

On ARM, this makes sure that AV_WN64 (or two consecutive AV_WN32) is
done with two str instructions instead of one strd.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agointreadwrite: Add intermediate variables in the byteswise AV_W*() macros
Martin Storsjö [Mon, 1 Aug 2016 06:07:48 +0000 (09:07 +0300)]
intreadwrite: Add intermediate variables in the byteswise AV_W*() macros

This avoids issues with expanding the argument multiple times,
and makes sure that it is of the right type for the following shifts.

Even if the caller of a macro could be expected not to pass parameters
that have side effects if expanded multiple times, these fallback
codepaths are rarely, if ever, tested, so it is expected that such
issues can arise.

Thefore, for safety, make sure the fallback codepaths only expand
the arguments once.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibavutil: Use an intermediate variable in AV_COPY*U
Martin Storsjö [Thu, 28 Jul 2016 11:30:25 +0000 (14:30 +0300)]
libavutil: Use an intermediate variable in AV_COPY*U

If AV_RN and AV_WN are macros with multiple individual reads and
writes, the previous version of the AV_COPYU macro would fail if
the reads and writes overlap.

This should not be any less efficient in any case, given a
sensibly optimizing compiler.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoDon't use expressions with side effects in macro parameters
Martin Storsjö [Thu, 28 Jul 2016 10:10:22 +0000 (13:10 +0300)]
Don't use expressions with side effects in macro parameters

AV_WB32 can be implemented as a macro that expands its parameters
multiple times (in case AV_HAVE_FAST_UNALIGNED isn't set and the
compiler doesn't support GCC attributes); make sure not to read
multiple times from the source in this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agodxv: Check to make sure we don't overrun buffers on corrupt inputs
Martin Storsjö [Thu, 28 Jul 2016 10:45:24 +0000 (13:45 +0300)]
dxv: Check to make sure we don't overrun buffers on corrupt inputs

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoqsvdec: only access hwaccel_context is the pixel format is QSV
Anton Khirnov [Sat, 30 Jul 2016 14:38:51 +0000 (16:38 +0200)]
qsvdec: only access hwaccel_context is the pixel format is QSV

We do not strictly specify that hwaccel_context must be cleared if no
hwaccel is used.

Reported-By: wm4 <nfxjfg@googlemail.com>
8 years agoflac demuxer: improve probing
Anton Khirnov [Sat, 30 Jul 2016 13:14:26 +0000 (15:14 +0200)]
flac demuxer: improve probing

Extend the probe function to validate the STREAMINFO block that must
follow the fLaC ID tag.

8 years agoFix instances of broken indentation found by gcc 6
Anton Khirnov [Fri, 29 Jul 2016 14:18:25 +0000 (16:18 +0200)]
Fix instances of broken indentation found by gcc 6

8 years agox11grab: Rename internal component to "xcbgrab"
Diego Biurrun [Wed, 27 Jul 2016 09:31:49 +0000 (11:31 +0200)]
x11grab: Rename internal component to "xcbgrab"

8 years agoRemove the legacy X11 screen grabber
Diego Biurrun [Wed, 27 Jul 2016 09:25:19 +0000 (11:25 +0200)]
Remove the legacy X11 screen grabber

The XCB screen grabber is a drop-in replacement and not under GPL.

8 years agoac3dec: Add some inline hints
Luca Barbato [Mon, 18 Jul 2016 17:50:34 +0000 (19:50 +0200)]
ac3dec: Add some inline hints

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agoac3dec: Simplify skipping
Luca Barbato [Mon, 18 Jul 2016 17:50:35 +0000 (19:50 +0200)]
ac3dec: Simplify skipping

skip_bits_long() can skip up to 32-bit ranges.

Signed-off-by: Diego Biurrun <diego@biurrun.de>