libav.git
7 months agompjpeg: Use proper CR/LF in multipart headers
Martin Storsjö [Wed, 10 May 2017 20:57:20 +0000 (23:57 +0300)]
mpjpeg: Use proper CR/LF in multipart headers

This is more correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agoh264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()
Sean McGovern [Sun, 7 May 2017 21:11:59 +0000 (17:11 -0400)]
h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()

Bug-Id: 1036
CC: libav-stable@libav.org
7 months agohevcdec: move SEI message parsing into a separate header
James Almer [Sun, 7 May 2017 13:51:59 +0000 (10:51 -0300)]
hevcdec: move SEI message parsing into a separate header

It doesn't depend on hevcdec anymore.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agohevcdec: remove HEVCContext usage from hevc_sei
James Almer [Sun, 7 May 2017 13:51:58 +0000 (10:51 -0300)]
hevcdec: remove HEVCContext usage from hevc_sei

Based on the H264 SEI implementation.

This will be mainly useful once support for SEI messages that can be
used by the hevc parser are implemented, like Picture Timing.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoarm: Check for the .arch directive in configure
Martin Storsjö [Wed, 3 May 2017 08:18:51 +0000 (11:18 +0300)]
arm: Check for the .arch directive in configure

When targeting windows, the .arch directive isn't available.

So far, when building for windows, we've always used gas-preprocessor,
both when using msvc's armasm and when using clang. Lately, clang/llvm
has implemented the last missing piece (altmacro support) for building
our assembly without gas-preprocessor. This means that we now build
for arm/windows with clang without any extra compatibility layer.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agohevc: Add NEON 32x32 IDCT
Alexandra Hájková [Thu, 4 May 2017 08:52:52 +0000 (10:52 +0200)]
hevc: Add NEON 32x32 IDCT

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agohevc: 16x16 NEON idct: Use the right element size for loads/stores
Alexandra Hájková [Thu, 4 May 2017 08:49:16 +0000 (10:49 +0200)]
hevc: 16x16 NEON idct: Use the right element size for loads/stores

This doesn't change the actual behaviour of the code but improves
readability.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agoaacsbr: Turnoff in the event of over read.
Alex Converse [Mon, 20 Mar 2017 19:44:42 +0000 (12:44 -0700)]
aacsbr: Turnoff in the event of over read.

Aliased compressed AAC bytes are almost certainly not meaningful SBR
data. In the wild this causes harsh artifacts switching HE-AAC streams
that don't have SBR headers aligned with segment boundaries.

Turning off SBR falls back to a default set of upsampling parameters
that can function as a sort of error concealment. This is consistent
with how the decoder handles other sorts of errors.

Bug-Id: 1047
CC: libav-stable@libav.org
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
7 months agoaac: Split function to parse ADTS header data into public and private part
Diego Biurrun [Wed, 26 Apr 2017 16:57:54 +0000 (18:57 +0200)]
aac: Split function to parse ADTS header data into public and private part

This makes the currently semi-public avpriv_aac_parse_header() function
private to libavcodec and adds a proper public API function to return
the parts of the ADTS header required in libavformat.

7 months agobitstream: Move VLC reading functions into the vlc.h header
Luca Barbato [Sat, 29 Apr 2017 00:34:12 +0000 (00:34 +0000)]
bitstream: Move VLC reading functions into the vlc.h header

This makes the bitstream.h header leaner.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 months agovlc: Add header #include when the types are used
Luca Barbato [Sat, 29 Apr 2017 00:34:11 +0000 (00:34 +0000)]
vlc: Add header #include when the types are used

Do not rely on indirectly including it from bitstream.h.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 months agohevc: Add NEON add_residual for bitdepth 10
Alexandra Hájková [Mon, 1 May 2017 18:16:02 +0000 (20:16 +0200)]
hevc: Add NEON add_residual for bitdepth 10

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agovf_hwmap: Add reverse mapping for hardware frames
Mark Thompson [Sat, 4 Mar 2017 23:57:42 +0000 (23:57 +0000)]
vf_hwmap: Add reverse mapping for hardware frames

This is something of a hack.  It allocates a new hwframe context for
the target format, then maps it back to the source link and overwrites
the input link hw_frames_ctx so that the previous filter will receive
the frames we want from ff_get_video_buffer().  It may fail if
the previous filter imposes any additional constraints on the frames
it wants to use as output.

7 months agovf_hwmap: Add device derivation
Mark Thompson [Sat, 4 Mar 2017 23:57:41 +0000 (23:57 +0000)]
vf_hwmap: Add device derivation

Also refactor a little and improve error messages to make failure
cases easier to understand.

7 months agohwcontext: Improve allocation in derived contexts
Mark Thompson [Sat, 4 Mar 2017 23:57:40 +0000 (23:57 +0000)]
hwcontext: Improve allocation in derived contexts

Use the flags argument of av_hwframe_ctx_create_derived() to pass the
mapping flags which will be used on allocation.  Also, set the format
and hardware context on the allocated frame automatically - the user
should not be required to do this themselves.

7 months agohwcontext_qsv: Implement mapping frames to the child device type
Mark Thompson [Sat, 4 Mar 2017 23:57:45 +0000 (23:57 +0000)]
hwcontext_qsv: Implement mapping frames to the child device type

7 months agohwcontext_qsv: Implement mapping frames from the child device type
Mark Thompson [Sat, 4 Mar 2017 23:57:44 +0000 (23:57 +0000)]
hwcontext_qsv: Implement mapping frames from the child device type

Factorises out existing surface initialisation code to reuse.

7 months agohwcontext: Add frame context mapping for nontrivial contexts
Mark Thompson [Sat, 4 Mar 2017 23:57:39 +0000 (23:57 +0000)]
hwcontext: Add frame context mapping for nontrivial contexts

Some frames contexts are not usable without additional format-specific
state in hwctx.  This change adds new functions frames_derive_from and
frames_derive_to to initialise this state appropriately when deriving
a frames context which will require it to be set.

7 months agohwcontext_qsv: Support derivation from child devices
Mark Thompson [Sat, 4 Mar 2017 23:57:43 +0000 (23:57 +0000)]
hwcontext_qsv: Support derivation from child devices

7 months agoavconv: Support setting the hardware device to use when filtering
Mark Thompson [Sat, 4 Mar 2017 23:57:38 +0000 (23:57 +0000)]
avconv: Support setting the hardware device to use when filtering

This only supports one device globally, but more can be used by
passing them with input streams in hw_frames_ctx or by deriving new
devices inside a filter graph with hwmap.

7 months agoavconv_hw: Add implicit device creation with default parameters
Mark Thompson [Sun, 30 Apr 2017 13:11:51 +0000 (14:11 +0100)]
avconv_hw: Add implicit device creation with default parameters

If -hwaccel foo is supplied without any other device options, and the
foo hwaccel is meant to have a device, try to make such a device with
default parameters for the hwaccel to use.

7 months agovp9_raw_reorder_bsf: Remove a redundant allocation
Mark Thompson [Wed, 26 Apr 2017 20:39:54 +0000 (21:39 +0100)]
vp9_raw_reorder_bsf: Remove a redundant allocation

This was left over from an earlier version which created the new
packet inside the current frame structure.  Now it just leaks an
unused packet, so remove the allocation entirely.

7 months agompeg4audio: Make avpriv_copy_pce_data() inline
Anton Khirnov [Thu, 16 Mar 2017 16:34:12 +0000 (17:34 +0100)]
mpeg4audio: Make avpriv_copy_pce_data() inline

The function currently accepts a PutBitContext and a GetBitContext,
which hardcodes their sizes into the lavc ABI. Since the function is
quite small and only called in a few places, the simplest solution is
making it inline, thus avoiding a runtime dependency completely.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 months agoarm: hevc_idct: Tune the add_res_8x8 and add_res_32x32 functions
Martin Storsjö [Thu, 27 Apr 2017 21:36:40 +0000 (00:36 +0300)]
arm: hevc_idct: Tune the add_res_8x8 and add_res_32x32 functions

Before:              Cortex     A7      A8      A9     A53
hevc_add_res_8x8_8_neon:     116.0    58.7    80.2    90.7
hevc_add_res_32x32_8_neon:  1230.0   737.5  1187.5   974.4
After:
hevc_add_res_8x8_8_neon:      97.7    57.0    73.7    80.0
hevc_add_res_32x32_8_neon:  1216.0   698.7  1127.5   827.1

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agohevc: Add NEON add_residual for bitdepth 8
Seppo Tomperi [Thu, 27 Apr 2017 19:05:29 +0000 (21:05 +0200)]
hevc: Add NEON add_residual for bitdepth 8

Optimized by Alexandra Hájková.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agomlp_parser: Drop in-parser downmix functionality
Vittorio Giovara [Wed, 26 Apr 2017 15:08:17 +0000 (11:08 -0400)]
mlp_parser: Drop in-parser downmix functionality

request_channel_layout is a decoder option and it makes no sense
to have it in a parser.

This feature was needed in the past when the decoder was allowed
to reuse the avctx from the demuxer. Nowadays the decoder receives
only the parameters from it, already containing the real channel
layout (and the correct request_channel_layout option).

After initialization the decoder overwrites the channel layout
with the downmixed one that is actually output, so there is no need
to preserve this functionality in the parser.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 months agoaac_ac3_parser: Drop in-parser downmix functionality
Vittorio Giovara [Wed, 26 Apr 2017 15:08:17 +0000 (11:08 -0400)]
aac_ac3_parser: Drop in-parser downmix functionality

request_channel_layout is a decoder option and it makes no sense
to have it in a parser.

This feature was needed in the past when the decoder was allowed
to reuse the avctx from the demuxer. Nowadays the decoder receives
only the parameters from it, already containing the real channel
layout (and the correct request_channel_layout option).

After initialization the decoder overwrites the channel layout
with the downmixed one that is actually output, so there is no need
to preserve this functionality in the parser.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 months agoavprobe: use av_spherical_projection_name() to print spherical projection names
James Almer [Tue, 4 Apr 2017 20:24:19 +0000 (17:24 -0300)]
avprobe: use av_spherical_projection_name() to print spherical projection names

Signed-off-by: James Almer <jamrial@gmail.com>
7 months agodump: use av_spherical_projection_name() to print spherical projection names
James Almer [Tue, 4 Apr 2017 20:24:18 +0000 (17:24 -0300)]
dump: use av_spherical_projection_name() to print spherical projection names

Signed-off-by: James Almer <jamrial@gmail.com>
7 months agospherical: add functions to retrieve and request projection names
James Almer [Thu, 20 Apr 2017 15:40:48 +0000 (11:40 -0400)]
spherical: add functions to retrieve and request projection names

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 months agovaapi: Add external control of allow-profile-mismatch
Mark Thompson [Mon, 27 Mar 2017 19:46:11 +0000 (20:46 +0100)]
vaapi: Add external control of allow-profile-mismatch

Uses the just-added ALLOW_PROFILE_MISMATCH flag.

7 months agolavc: Add flag to allow profile mismatch with hardware decoding
Mark Thompson [Mon, 27 Mar 2017 19:45:21 +0000 (20:45 +0100)]
lavc: Add flag to allow profile mismatch with hardware decoding

7 months agovaapi_encode: Use gop_size consistently in RC parameters
Mark Thompson [Sun, 2 Apr 2017 22:05:13 +0000 (23:05 +0100)]
vaapi_encode: Use gop_size consistently in RC parameters

The non-H.26[45] codecs already use this form.  Since we don't
currently generate I frames for codecs which support them separately
to IDR, the p_per_i variable is set to infinity by default so that it
doesn't interfere with any other calculation.  (All the code for I
frames still exists, and it works for H.264 if set manually.)

7 months agoavfoundation: update to use AVCodecParameters
Vittorio Giovara [Wed, 26 Apr 2017 15:31:28 +0000 (11:31 -0400)]
avfoundation: update to use AVCodecParameters

7 months agomlp: Factor out channel layout subset checks
Vittorio Giovara [Tue, 25 Apr 2017 20:26:58 +0000 (16:26 -0400)]
mlp: Factor out channel layout subset checks

7 months agomlp: Drop ff_ prefix from a static function
Vittorio Giovara [Tue, 25 Apr 2017 20:26:57 +0000 (16:26 -0400)]
mlp: Drop ff_ prefix from a static function

7 months agomlp: Rename the channel layout variable
Vittorio Giovara [Tue, 25 Apr 2017 20:26:56 +0000 (16:26 -0400)]
mlp: Rename the channel layout variable

Purely cosmetic change, will make code more readable once the new
channel layout takes over.

7 months agomatroskaenc: don't warn about unknown spherical metadata when there isn't any
James Almer [Fri, 14 Apr 2017 16:06:35 +0000 (13:06 -0300)]
matroskaenc: don't warn about unknown spherical metadata when there isn't any

The same warning is issued when actual unknown spherical metadata is
found further down in the function.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 months agomem: uninline av_malloc(z)_array()
Anton Khirnov [Thu, 30 Mar 2017 15:02:39 +0000 (17:02 +0200)]
mem: uninline av_malloc(z)_array()

Inlining public functions hardcodes their implementation into the ABI,
so it should be avoided unless there is a very good reason for it. No
such reason exists in this case.

7 months agohevc: Add support for bitdepth 10 for IDCT DC
Alexandra Hájková [Tue, 25 Apr 2017 17:43:41 +0000 (19:43 +0200)]
hevc: Add support for bitdepth 10 for IDCT DC

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agohevc: Add NEON IDCT DC functions for bitdepth 8
Seppo Tomperi [Tue, 25 Apr 2017 17:41:29 +0000 (19:41 +0200)]
hevc: Add NEON IDCT DC functions for bitdepth 8

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agoclearvideo: Convert to the new bitstream reader
Diego Biurrun [Fri, 14 Apr 2017 18:42:47 +0000 (20:42 +0200)]
clearvideo: Convert to the new bitstream reader

7 months agoAdd ClearVideo decoder
Kostya Shishkov [Thu, 2 Mar 2017 10:21:48 +0000 (11:21 +0100)]
Add ClearVideo decoder

Only I-frames are decoded for now.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 months agoavprobe: Handle unknown values for the color description
Luca Barbato [Mon, 17 Apr 2017 13:48:54 +0000 (13:48 +0000)]
avprobe: Handle unknown values for the color description

print_str() cannot print NULL.

Bug-Id: 1040
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoutvideodec: Fix gradient prediction when stride does not match width
Paul B Mahol [Fri, 21 Apr 2017 19:44:28 +0000 (21:44 +0200)]
utvideodec: Fix gradient prediction when stride does not match width

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoutvideodec: Fix decoding odd sizes with interlaced video with some formats
Paul B Mahol [Fri, 21 Apr 2017 10:27:17 +0000 (12:27 +0200)]
utvideodec: Fix decoding odd sizes with interlaced video with some formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoavplay: Do not try to allocate new frames when the player is closing
Luca Barbato [Mon, 17 Apr 2017 22:22:17 +0000 (22:22 +0000)]
avplay: Do not try to allocate new frames when the player is closing

The allocation event can trigger while the decoding thread is already
closing.

Bug-Id: 1052
CC: libav-stable@libav.org
7 months agoconfigure: Fix sem_timedwait probe
Luca Barbato [Sun, 23 Apr 2017 14:10:20 +0000 (14:10 +0000)]
configure: Fix sem_timedwait probe

It requires pthreads.

7 months agoconfigure: Properly escape arguments in filter/filter_out helper functions
Luca Barbato [Thu, 6 Apr 2017 16:14:29 +0000 (18:14 +0200)]
configure: Properly escape arguments in filter/filter_out helper functions

The arguments may contain '$', which gets interpreted by the shell.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agodca: Move the downmix request check outside the loop
Anton Khirnov [Mon, 24 Apr 2017 20:39:32 +0000 (22:39 +0200)]
dca: Move the downmix request check outside the loop

7 months agovc1dec: raise an error if sprite picture data is missing
Sean McGovern [Sat, 22 Apr 2017 23:16:34 +0000 (19:16 -0400)]
vc1dec: raise an error if sprite picture data is missing

Bug-Id: 1013
CC: libav-stable@libav.org
7 months agodoc/examples/output: Cast pointer to the right (const) type
Diego Biurrun [Sat, 22 Apr 2017 11:19:04 +0000 (13:19 +0200)]
doc/examples/output: Cast pointer to the right (const) type

doc/examples/output.c:512:33: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type

7 months agodoc/examples/filter_audio: const correctness
Diego Biurrun [Sat, 22 Apr 2017 11:12:29 +0000 (13:12 +0200)]
doc/examples/filter_audio: const correctness

doc/examples/filter_audio.c:168:17: warning: assignment discards ‘const’ qualifier from pointer target type

7 months agoswscale-test: const correctness
Diego Biurrun [Wed, 19 Apr 2017 09:11:09 +0000 (11:11 +0200)]
swscale-test: const correctness

7 months agoqsvenc: Make sure the interlaced encoding works
Aaron Levinson [Mon, 17 Apr 2017 01:06:37 +0000 (18:06 -0700)]
qsvenc: Make sure the interlaced encoding works

And reduce the vertical alignment constraint when possible to reduce the
memory usage.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoqsvenc: Use MFXVideoENCODE_Query() to update the parameters
Aaron Levinson [Mon, 17 Apr 2017 01:07:42 +0000 (18:07 -0700)]
qsvenc: Use MFXVideoENCODE_Query() to update the parameters

Fill out the default/unset parameters with ones actually in use.

Matches the current MediaSDK example code.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agocheckasm: hevc: Add a hevc_ prefix to the add_residual functions
Martin Storsjö [Wed, 19 Apr 2017 07:37:51 +0000 (10:37 +0300)]
checkasm: hevc: Add a hevc_ prefix to the add_residual functions

This makes it easier to group them with the rest when running e.g.
--bench=hevc.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 months agomm: Skip unexpected audio packets
Luca Barbato [Mon, 17 Apr 2017 19:25:35 +0000 (19:25 +0000)]
mm: Skip unexpected audio packets

Bug-Id: 1046
CC: libav-stable@libav.org
7 months agomjpeg: Report non-3 component rgb lossless as not supported
Luca Barbato [Mon, 17 Apr 2017 19:11:57 +0000 (19:11 +0000)]
mjpeg: Report non-3 component rgb lossless as not supported

Bug-Id: 1043
CC: libav-stable@libav.org
7 months agoflv: Validate the packet size
Luca Barbato [Mon, 17 Apr 2017 14:10:52 +0000 (14:10 +0000)]
flv: Validate the packet size

Size can be negative at that point.

Bug-Id: 1041
CC: libav-stable@libav.org
7 months agotravis: Exclude gcc for the macOS target
Luca Barbato [Tue, 18 Apr 2017 18:21:35 +0000 (20:21 +0200)]
travis: Exclude gcc for the macOS target

On a normal macOS setup, 'gcc' is a symlink to clang. Therefore there is
little point in running the tests twice, with CC=gcc and CC=clang.

7 months agodca: Account for lfe when checking for the channel count
Luca Barbato [Mon, 17 Apr 2017 12:53:14 +0000 (12:53 +0000)]
dca: Account for lfe when checking for the channel count

Bug-Id: 1037
CC: libav-stable@libav.org
7 months agoswscale: Convert the check check_image_pointers helper to a macro
Luca Barbato [Sat, 15 Apr 2017 12:55:33 +0000 (14:55 +0200)]
swscale: Convert the check check_image_pointers helper to a macro

Avoid warnings about types mismatch and make the code a little simpler.

7 months agoswscale: Do not shift negative values directly
Luca Barbato [Sat, 15 Apr 2017 12:39:45 +0000 (14:39 +0200)]
swscale: Do not shift negative values directly

It is undefined in C as reported:
    warning: shifting a negative signed value is undefined

7 months agoutvideodec: Support for gradient prediction
Paul B Mahol [Fri, 7 Apr 2017 18:09:22 +0000 (20:09 +0200)]
utvideodec: Support for gradient prediction

Introduced with utvideo 18.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoutvideodec: Reuse the huffyuv add_left
Paul B Mahol [Fri, 23 Dec 2016 14:41:51 +0000 (15:41 +0100)]
utvideodec: Reuse the huffyuv add_left

~10% faster when simd is available.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoutvideodec: Support ULY4 and ULH4
Paul B Mahol [Sat, 3 Sep 2016 23:56:02 +0000 (01:56 +0200)]
utvideodec: Support ULY4 and ULH4

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 months agoutvideodec: Support UQRA and UQRG
Paul B Mahol [Mon, 10 Apr 2017 09:35:00 +0000 (11:35 +0200)]
utvideodec: Support UQRA and UQRG

7 months agoswscale: Add gbrap10 output
Michael Niedermayer [Wed, 9 Nov 2016 23:02:50 +0000 (00:02 +0100)]
swscale: Add gbrap10 output

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 months agoswscale: Add input support for gbrap10 pixel format
Paul B Mahol [Fri, 10 Jun 2016 11:01:26 +0000 (13:01 +0200)]
swscale: Add input support for gbrap10 pixel format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 months agopixfmt: Add gbrap10 pixel format
Paul B Mahol [Fri, 10 Jun 2016 10:48:09 +0000 (12:48 +0200)]
pixfmt: Add gbrap10 pixel format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 months agoutvideodec: Support UQY2
Paul B Mahol [Mon, 10 Apr 2017 09:08:44 +0000 (11:08 +0200)]
utvideodec: Support UQY2

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 months agoavformat: Free the internal codec context at the end
Luca Barbato [Tue, 11 Apr 2017 23:46:30 +0000 (01:46 +0200)]
avformat: Free the internal codec context at the end

Avoid a use after free in avformat_find_stream_info.

CC: libav-stable@libav.org
8 months agogolomb: Simplify get_ur_golomb_jpegls
Luca Barbato [Tue, 11 Apr 2017 10:11:59 +0000 (12:11 +0200)]
golomb: Simplify get_ur_golomb_jpegls

The loop always consumes the bit read and the new bitstream reader
can read 0 bits just fine.

8 months agoutvideodec: Prevent possible signed overflow
Ganesh Ajjanagadde [Tue, 23 Feb 2016 04:21:58 +0000 (23:21 -0500)]
utvideodec: Prevent possible signed overflow

Doing slice_end - slice_start is unsafe and can lead to undefined behavior
until slice_end has been properly sanitized.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 months agofmvc: Add FATE tests
Diego Biurrun [Tue, 21 Mar 2017 11:16:00 +0000 (12:16 +0100)]
fmvc: Add FATE tests

8 months agoAdd FM Screen Capture Codec decoder
Paul B Mahol [Mon, 6 Feb 2017 08:17:29 +0000 (09:17 +0100)]
Add FM Screen Capture Codec decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 months agohevc: Add NEON 16x16 IDCT
Alexandra Hájková [Wed, 12 Apr 2017 07:29:44 +0000 (09:29 +0200)]
hevc: Add NEON 16x16 IDCT

The speedup vs C code is around 6-13x.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 months agoac3_parser: add a public function for parsing the data required by the demuxer
Anton Khirnov [Thu, 30 Mar 2017 14:56:28 +0000 (16:56 +0200)]
ac3_parser: add a public function for parsing the data required by the demuxer

Make the current semi-public avpriv_ac3_parse_header() private to lavc.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 months agothread: Define ff_mutex_* macros as stub functions when threads are disabled
Diego Biurrun [Fri, 31 Mar 2017 17:04:56 +0000 (19:04 +0200)]
thread: Define ff_mutex_* macros as stub functions when threads are disabled

Silences a bunch of "statement with no effect" warnings with threads disabled.

8 months agoexamples: Fixed and extended Doxygen documentation
Andreas Unterweger [Mon, 10 Apr 2017 11:06:18 +0000 (13:06 +0200)]
examples: Fixed and extended Doxygen documentation

Added parameter descriptions for all functions
 and converted in-function comments into regular
 (non-Doxygen) comments.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 months agodecode: Initialize ret before using it
Vittorio Giovara [Mon, 3 Apr 2017 19:58:15 +0000 (21:58 +0200)]
decode: Initialize ret before using it

libavcodec/decode.c:608:9: warning: variable 'ret' is
      used uninitialized whenever 'if' condition is false

8 months agofiltfmts-test: Mark filter as const
Vittorio Giovara [Tue, 4 Apr 2017 15:56:34 +0000 (17:56 +0200)]
filtfmts-test: Mark filter as const

libavfilter/tests/filtfmts.c:57:18: warning:
      assigning to 'AVFilter *' (aka 'struct AVFilter *') from
      'const AVFilter *' (aka 'const struct AVFilter *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]

8 months agolavfi: Drop unused and empty header file
Vittorio Giovara [Wed, 5 Apr 2017 13:35:26 +0000 (15:35 +0200)]
lavfi: Drop unused and empty header file

This header was public but deprecated on 2013-04-11 (lavfi 3.8.0).

8 months agomatroska: Read only the data written in the scratch buffer
Luca Barbato [Fri, 7 Apr 2017 09:41:27 +0000 (11:41 +0200)]
matroska: Read only the data written in the scratch buffer

The private buffer is 20bytes but depending on the type only 12 bytes
are actually filled.

8 months agompeg4videodec: raise an error if sprite_trajectory.table is NULL
Sean McGovern [Thu, 30 Mar 2017 20:21:38 +0000 (16:21 -0400)]
mpeg4videodec: raise an error if sprite_trajectory.table is NULL

CC: libav-stable@libav.org
Bug-Id: 1012

8 months agoconfigure: Better names for functions that sanitize input
Diego Biurrun [Tue, 21 Mar 2017 11:22:23 +0000 (12:22 +0100)]
configure: Better names for functions that sanitize input

8 months agomov: Move code shared with CAF to a separate file
Diego Biurrun [Tue, 14 Mar 2017 15:43:29 +0000 (16:43 +0100)]
mov: Move code shared with CAF to a separate file

8 months agoqsvenc: Allow use of hw_device_ctx to make the internal session
Mark Thompson [Sat, 4 Mar 2017 23:57:37 +0000 (23:57 +0000)]
qsvenc: Allow use of hw_device_ctx to make the internal session

8 months agoqsvdec: Allow use of hw_device_ctx to make the internal session
Mark Thompson [Sat, 4 Mar 2017 23:57:36 +0000 (23:57 +0000)]
qsvdec: Allow use of hw_device_ctx to make the internal session

8 months agoqsv: Add ability to create a session from a device
Mark Thompson [Sat, 4 Mar 2017 23:57:35 +0000 (23:57 +0000)]
qsv: Add ability to create a session from a device

8 months agodoc: Add VAAPI encoders
Mark Thompson [Sun, 19 Mar 2017 17:30:52 +0000 (17:30 +0000)]
doc: Add VAAPI encoders

8 months agovaapi_encode: Add VP9 support
Mark Thompson [Mon, 28 Nov 2016 23:54:57 +0000 (23:54 +0000)]
vaapi_encode: Add VP9 support

8 months agovp9: Add bsf to fix reordering in raw streams
Mark Thompson [Mon, 9 Jan 2017 23:08:49 +0000 (23:08 +0000)]
vp9: Add bsf to fix reordering in raw streams

Takes a raw input stream containing frames with correct timestamps but
possibly out of order and inserts additional show-existing-frame
packets to correct the ordering.

8 months agovp9: Add bsf to merge superframes
Ronald S. Bultje [Mon, 29 Feb 2016 14:43:07 +0000 (09:43 -0500)]
vp9: Add bsf to merge superframes

From ffmpeg commit 2e6636aa87303d37b112e79f093ca39500f92364.

8 months agoavconv: Flush output BSFs when encode reaches EOF
Mark Thompson [Tue, 14 Mar 2017 00:39:57 +0000 (00:39 +0000)]
avconv: Flush output BSFs when encode reaches EOF

Before this, output bitstream filters would never see EOF and
therefore would not be able to flush any delayed packets.

8 months agovf_deinterlace_vaapi: Add support for field rate output
Mark Thompson [Mon, 27 Feb 2017 21:29:46 +0000 (21:29 +0000)]
vf_deinterlace_vaapi: Add support for field rate output

In order to work correctly with the i965 driver, this also fixes the
direction of forward/backward references - forward references are
intended to be those from the past to the current frame, not from the
current frame to the future.

8 months agopthread_frame: Propagate sw_pix_fmt across threads
Mark Thompson [Thu, 30 Mar 2017 21:58:59 +0000 (22:58 +0100)]
pthread_frame: Propagate sw_pix_fmt across threads

8 months agolibavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(
Martin Storsjö [Wed, 29 Mar 2017 10:44:28 +0000 (13:44 +0300)]
libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(

Previously, the former form always produced a manually aligned,
padded buffer, while the latter can use DECLARE_ALIGNED, if that
amount of stack alignment is supported.

libavutil/internal.h needs to include mem.h, since it uses
the DECLARE_ALIGNED macro.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 months agohevc: Avoid using LOCAL_ALIGNED for 4 byte alignment
Martin Storsjö [Wed, 29 Mar 2017 10:43:40 +0000 (13:43 +0300)]
hevc: Avoid using LOCAL_ALIGNED for 4 byte alignment

The data types within the MvField struct themselves imply 4 byte alignment.

Signed-off-by: Martin Storsjö <martin@martin.st>