OSDN Git Service

android-x86/external-ffmpeg.git
7 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.

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

7 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

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

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

7 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>
7 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>
7 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>
7 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

7 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.

7 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.

7 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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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.

7 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

7 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>
7 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>
7 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>
7 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>
7 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

7 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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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.

7 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

7 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"

7 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.

7 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>
7 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>
7 years agoac3dec: Split coupling-specific code from decode_audio_block()
Luca Barbato [Mon, 18 Jul 2016 17:50:33 +0000 (19:50 +0200)]
ac3dec: Split coupling-specific code from decode_audio_block()

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agoac3dec: Split spx-specific code from decode_audio_block()
Luca Barbato [Mon, 18 Jul 2016 17:50:32 +0000 (19:50 +0200)]
ac3dec: Split spx-specific code from decode_audio_block()

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomov: Validate the ID number
Luca Barbato [Tue, 26 Jul 2016 09:42:11 +0000 (11:42 +0200)]
mov: Validate the ID number

IDs in MOV start from 1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomimic: do not release the newly obsolete reference at the end of decoding
Anton Khirnov [Mon, 25 Jul 2016 11:52:59 +0000 (13:52 +0200)]
mimic: do not release the newly obsolete reference at the end of decoding

The reference frames are used in update_thread_context(), so modifying
them after finish_setup() is a race. The frame in question will be
released during the next decode call.

CC: libav-stable@libav.org
7 years agoconfigure: Simplify license incompatibility check
Diego Biurrun [Mon, 25 Jul 2016 13:07:58 +0000 (15:07 +0200)]
configure: Simplify license incompatibility check

7 years agoavconv: Check that muxing_queue exists before reading from it
Diego Biurrun [Mon, 25 Jul 2016 13:04:02 +0000 (15:04 +0200)]
avconv: Check that muxing_queue exists before reading from it

This avoids a segfault on nonexisting codec names.

7 years agoconfigure: Allow detecting and using LLVM lld-link as linker for windows
Martin Storsjö [Fri, 22 Jul 2016 07:19:52 +0000 (10:19 +0300)]
configure: Allow detecting and using LLVM lld-link as linker for windows

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoconfigure: Move defines for controlling MSVCRT headers to the CRT detection section
Martin Storsjö [Wed, 20 Jul 2016 21:04:35 +0000 (00:04 +0300)]
configure: Move defines for controlling MSVCRT headers to the CRT detection section

This allows these flags to be automatically enabled for clang,
when using MSVCRT headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoconfigure: Check for strtoll and redirect to _strtoi64 in the msvcrt block
Martin Storsjö [Wed, 20 Jul 2016 20:39:20 +0000 (23:39 +0300)]
configure: Check for strtoll and redirect to _strtoi64 in the msvcrt block

This allows doing this redirection, if building with clang against
old enough MSVC headers that lack strtoll (2012 and older).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agohpeldsp: Explain why put_no_rnd_pixels_tab is larger than necessary
Diego Biurrun [Tue, 19 Jan 2016 16:57:03 +0000 (17:57 +0100)]
hpeldsp: Explain why put_no_rnd_pixels_tab is larger than necessary

7 years agocheckasm: Cast unsigned to signed
Luca Barbato [Tue, 19 Jul 2016 03:26:33 +0000 (05:26 +0200)]
checkasm: Cast unsigned to signed

Avoid a warning for passing an unsigned value to abs(), some compilers
might optimize away abs().

7 years agovpx: Support color range
Luca Barbato [Fri, 22 Jul 2016 07:33:04 +0000 (09:33 +0200)]
vpx: Support color range

The range field has been introduced in version 1.6.0

7 years agolavfi: add a QSV deinterlacing filter
Anton Khirnov [Sat, 2 Jul 2016 10:12:36 +0000 (12:12 +0200)]
lavfi: add a QSV deinterlacing filter

7 years agoqsvenc: print warnings from encode/init
Anton Khirnov [Thu, 14 Jul 2016 10:56:35 +0000 (12:56 +0200)]
qsvenc: print warnings from encode/init

7 years agoqsvenc: do not re-execute encoding on all positive status codes
Anton Khirnov [Thu, 14 Jul 2016 10:52:20 +0000 (12:52 +0200)]
qsvenc: do not re-execute encoding on all positive status codes

It should only be done for DEVICE_BUSY/IN_EXECUTION

7 years agoqsv: print more complete error messages
Anton Khirnov [Sat, 25 Jun 2016 19:38:10 +0000 (21:38 +0200)]
qsv: print more complete error messages

Include the libmfx error code and its description

7 years agoqsvenc: take only the allocated dimensions from the frames context
Anton Khirnov [Thu, 14 Jul 2016 10:05:58 +0000 (12:05 +0200)]
qsvenc: take only the allocated dimensions from the frames context

Other parameters, like the display size, should still be taken from the
codec context.

7 years agoqsvenc: add support for p010
Anton Khirnov [Wed, 22 Jun 2016 17:57:28 +0000 (19:57 +0200)]
qsvenc: add support for p010

7 years agoqsv: handle the semi-packed formats in map_fourcc as well
Anton Khirnov [Thu, 14 Jul 2016 10:31:47 +0000 (12:31 +0200)]
qsv: handle the semi-packed formats in map_fourcc as well

This will allow using this function for encoding as well, where the
input format is already the semi-packed version.

7 years agolavc: set sw_pix_fmt for hwaccel encoding
Anton Khirnov [Thu, 14 Jul 2016 10:13:53 +0000 (12:13 +0200)]
lavc: set sw_pix_fmt for hwaccel encoding

7 years agolavc: initialize AVCodecContext.sw_pix_fmt properly
Anton Khirnov [Thu, 14 Jul 2016 10:16:17 +0000 (12:16 +0200)]
lavc: initialize AVCodecContext.sw_pix_fmt properly

Currently it's memset to 0, which is YUV420P. It should be initialized
to none.

7 years agoavconv_qsv: use the actual pixel format provided by lavc
Anton Khirnov [Wed, 13 Jul 2016 07:16:35 +0000 (09:16 +0200)]
avconv_qsv: use the actual pixel format provided by lavc

Do not hardcode NV12. This allows 10bit decoding with -hwaccel qsv.

7 years agoavconv_qsv: align the surface size to 32
Anton Khirnov [Wed, 13 Jul 2016 07:15:56 +0000 (09:15 +0200)]
avconv_qsv: align the surface size to 32

This is required e.g. by HEVC.

7 years agoavconv: stop using setpts for input framerate forced with -r
Anton Khirnov [Fri, 15 Jul 2016 04:50:47 +0000 (06:50 +0200)]
avconv: stop using setpts for input framerate forced with -r

The setpts filter does not signal to the rest of the filtergraph that
the stream is CFR. Just generate the timestamps manually instead.

7 years agocheckasm: add HEVC test for testing IDCT DC
Alexandra Hájková [Thu, 21 Jul 2016 14:32:50 +0000 (16:32 +0200)]
checkasm: add HEVC test for testing IDCT DC

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoriff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.
Hendrik Leppkes [Wed, 2 May 2012 14:34:45 +0000 (16:34 +0200)]
riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.

According to the specification on the MSDN [1], 0 is valid for that
particular field, and it should be ignored in that case.

[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757714(v=vs.85).aspx

Bug-Id: 950

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoRevert "avprobe: Zero the allocated avio buffer memory"
Vittorio Giovara [Thu, 21 Jul 2016 19:45:25 +0000 (21:45 +0200)]
Revert "avprobe: Zero the allocated avio buffer memory"

This reverts commit 0e0538aefc75958ded49f5d075c99a81cf6b2bbb.

The valgrind warning was a false positive due to OSX implementation of
printf (invoking a strnlen), while this code is actually fine, since the
format specifier %.*s guarantes that no more than buf_size bytes from
buf will be read.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agolibavutil: Always use some GCC style attributes on clang
Martin Storsjö [Mon, 18 Jul 2016 20:25:11 +0000 (23:25 +0300)]
libavutil: Always use some GCC style attributes on clang

Clang normally disguises as GCC (defining __GNUC__), and thus get
all the normal GCC specific attributes.

Clang can also work as a drop-in replacement for MSVC, and in these
cases, it doesn't define __GNUC__, but defines _MSC_VER instead.

Even in these setups, it still supports the GCC style attributes,
thus use them, especially where there isn't any MSVC specific
version, or where the MSVC specific version doesn't work on clang
(for DECLARE_ASM_CONST).

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoarm: Check for support for the .fpu directive
Martin Storsjö [Mon, 18 Jul 2016 20:23:50 +0000 (23:23 +0300)]
arm: Check for support for the .fpu directive

When targeting COFF (windows), clang doesn't support this
directive (while binutils supports it for all targets).

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomov: Rework the check for invalid indexes in stsc
Vittorio Giovara [Wed, 13 Jul 2016 19:02:41 +0000 (15:02 -0400)]
mov: Rework the check for invalid indexes in stsc

There are samples with invalid stsc that may work fine as is and
do not need extradata change. So ignore any out of range index, and
error out only when explode is set.

Found-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agomov: Wrap stsc index and count compare in a separate function
Vittorio Giovara [Wed, 20 Jul 2016 16:48:09 +0000 (18:48 +0200)]
mov: Wrap stsc index and count compare in a separate function

8 years agomov: Fix stsc_count comparison
Matthieu Bouron [Wed, 20 Jul 2016 16:48:08 +0000 (18:48 +0200)]
mov: Fix stsc_count comparison

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoratecontrol: Reorder functions to avoid forward declarations
Vittorio Giovara [Wed, 20 Jul 2016 14:12:34 +0000 (16:12 +0200)]
ratecontrol: Reorder functions to avoid forward declarations

8 years agoratecontrol: Move Xvid-related functions to the place they are actually used
Vittorio Giovara [Wed, 20 Jul 2016 16:02:23 +0000 (18:02 +0200)]
ratecontrol: Move Xvid-related functions to the place they are actually used

This will simplify the de-MpegEncContextualization.

8 years agoratecontrol: Move mpegenc-only function where it is used
Vittorio Giovara [Wed, 20 Jul 2016 14:12:33 +0000 (16:12 +0200)]
ratecontrol: Move mpegenc-only function where it is used

8 years agoratecontrol: Drop commented out cruft
Vittorio Giovara [Wed, 20 Jul 2016 14:12:31 +0000 (16:12 +0200)]
ratecontrol: Drop commented out cruft

8 years agox86: huffyuv: Use EXTERNAL_SSSE3_FAST convenience macro where appropriate
Diego Biurrun [Mon, 18 Jan 2016 09:52:21 +0000 (10:52 +0100)]
x86: huffyuv: Use EXTERNAL_SSSE3_FAST convenience macro where appropriate

8 years agox86: cpu: Detect Conroe CPUs and their slow shuffle unit
Fiona Glaser [Thu, 14 Jan 2016 09:54:27 +0000 (10:54 +0100)]
x86: cpu: Detect Conroe CPUs and their slow shuffle unit

8 years agox86: Add SSSE3_SLOW CPU flag and related convenience macros
Diego Biurrun [Thu, 14 Jan 2016 10:37:34 +0000 (11:37 +0100)]
x86: Add SSSE3_SLOW CPU flag and related convenience macros

8 years agox86: Use *_FAST/*_SLOW CPU feature detection macros where appropriate
Diego Biurrun [Thu, 14 Jan 2016 09:57:41 +0000 (10:57 +0100)]
x86: Use *_FAST/*_SLOW CPU feature detection macros where appropriate

8 years agox86: hpeldsp: Don't check for bitexact flag when initializing VP3-specific code
Diego Biurrun [Tue, 19 Jan 2016 16:55:59 +0000 (17:55 +0100)]
x86: hpeldsp: Don't check for bitexact flag when initializing VP3-specific code

That code is only ever initialized with that flag set.

8 years agox86: hpeldsp: Drop unused function parameters
Diego Biurrun [Mon, 11 Jan 2016 15:06:33 +0000 (16:06 +0100)]
x86: hpeldsp: Drop unused function parameters

8 years agox86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate
Diego Biurrun [Mon, 11 Jan 2016 15:04:17 +0000 (16:04 +0100)]
x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate

8 years agox86: hpeldsp: Split off VP3-specific bits into a separate file
Diego Biurrun [Mon, 11 Jan 2016 14:53:41 +0000 (15:53 +0100)]
x86: hpeldsp: Split off VP3-specific bits into a separate file

8 years agoexamples: Properly free AVCodecContext
Vittorio Giovara [Wed, 20 Jul 2016 14:10:17 +0000 (16:10 +0200)]
examples: Properly free AVCodecContext

8 years agoavprobe: Zero the allocated avio buffer memory
Vittorio Giovara [Wed, 20 Jul 2016 13:44:10 +0000 (15:44 +0200)]
avprobe: Zero the allocated avio buffer memory

Fixes valgrind warning "Conditional jump or move depends on
uninitialised value(s)." from avio_flush().

8 years agolibdc1394: Fill in packet data directly
Vittorio Giovara [Wed, 13 Jul 2016 16:56:51 +0000 (12:56 -0400)]
libdc1394: Fill in packet data directly

Drop the packet embedded in the context.

8 years agoh264dec: do not call finish_setup() if we have not started a frame
Anton Khirnov [Wed, 20 Jul 2016 07:41:35 +0000 (09:41 +0200)]
h264dec: do not call finish_setup() if we have not started a frame

Found-By: Jan Ruge <jan.s.ruge@gmail.com>
Bug-Id: 952

8 years agoh264dec: handle zero-sized NAL units in get_last_needed_nal()
Anton Khirnov [Wed, 20 Jul 2016 06:31:38 +0000 (08:31 +0200)]
h264dec: handle zero-sized NAL units in get_last_needed_nal()

The current code will ignore the init_get_bits() failure and do an
invalid read from the uninitialized GetBitContext.

Found-By: Jan Ruge <jan.s.ruge@gmail.com>
Bug-Id: 952

8 years agoh264dec: make sure not to call finish_setup() more than once per frame
Anton Khirnov [Wed, 20 Jul 2016 07:59:45 +0000 (09:59 +0200)]
h264dec: make sure not to call finish_setup() more than once per frame

It does not break anything currently, but should not be done anyway.

8 years agoavconv_dxva2: add a profile check for hevc
Hendrik Leppkes [Sat, 30 Jan 2016 16:11:13 +0000 (17:11 +0100)]
avconv_dxva2: add a profile check for hevc

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agohevc: set profile based on the profile compatibility flags if needed
Hendrik Leppkes [Sat, 30 Jan 2016 16:44:34 +0000 (17:44 +0100)]
hevc: set profile based on the profile compatibility flags if needed

This fixes retrieving a valid profile for many of the FATE conformance samples,
allowing them to be properly decoded by the HWAccel after adding a profile check.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agohevc: Add AVX2 DC IDCT
James Almer [Wed, 29 Jun 2016 09:56:42 +0000 (11:56 +0200)]
hevc: Add AVX2 DC IDCT

Originally written by Pierre Edouard Lepere <pierre-edouard.lepere@insa-rennes.fr>.
Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
8 years agohevc: Add coefficient limiting to speed up IDCT
Mickaël Raulet [Tue, 5 Jul 2016 16:52:38 +0000 (18:52 +0200)]
hevc: Add coefficient limiting to speed up IDCT

Integrated to libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
8 years agohevc: Add DC IDCT
Mickaël Raulet [Mon, 4 Jul 2016 13:37:52 +0000 (15:37 +0200)]
hevc: Add DC IDCT

Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
8 years agohevcdsp_template: Templatize IDCT
Mickaël Raulet [Mon, 4 Jul 2016 13:31:16 +0000 (15:31 +0200)]
hevcdsp_template: Templatize IDCT

Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
8 years agohevc: Separate adding residual to prediction from IDCT
Alexandra Hájková [Sun, 3 Jul 2016 15:38:56 +0000 (17:38 +0200)]
hevc: Separate adding residual to prediction from IDCT

Based on patch 250430bf28118cf843df887e8c8b345f1c60c82d
by Mickaël Raulet <mraulet@insa-rennes.fr>, integrated
to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>