Commit Graph

44700 Commits

Author SHA1 Message Date
James Almer
648a0b4503 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>
2017-05-09 13:42:20 +02:00
Martin Storsjö
59cee42d7d 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>
2017-05-08 14:21:08 +03:00
Alexandra Hájková
ce080f47b8 hevc: Add NEON 32x32 IDCT
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-04 14:08:39 +02:00
Alexandra Hájková
118dd4a321 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>
2017-05-04 14:08:27 +02:00
Alex Converse
504403ab28 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>
2017-05-03 19:00:03 -04:00
Diego Biurrun
b5f19f7478 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.
2017-05-02 18:50:34 +02:00
Luca Barbato
0ac1fec1c3 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>
2017-05-02 18:39:10 +02:00
Luca Barbato
73fc82f343 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>
2017-05-02 18:38:26 +02:00
Alexandra Hájková
edbf0fffb1 hevc: Add NEON add_residual for bitdepth 10
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-01 23:39:55 +03:00
Mark Thompson
81a4cb8e58 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.
2017-04-30 17:33:18 +01:00
Mark Thompson
38cb05f1c8 vf_hwmap: Add device derivation
Also refactor a little and improve error messages to make failure
cases easier to understand.
2017-04-30 17:33:18 +01:00
Mark Thompson
c5714b51aa 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.
2017-04-30 17:33:18 +01:00
Mark Thompson
e1c5d56b18 hwcontext_qsv: Implement mapping frames to the child device type 2017-04-30 17:33:18 +01:00
Mark Thompson
eaa5e07104 hwcontext_qsv: Implement mapping frames from the child device type
Factorises out existing surface initialisation code to reuse.
2017-04-30 17:33:06 +01:00
Mark Thompson
27978155bc 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.
2017-04-30 16:13:56 +01:00
Mark Thompson
aa51bb3d27 hwcontext_qsv: Support derivation from child devices 2017-04-30 16:13:56 +01:00
Mark Thompson
e669db7610 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.
2017-04-30 16:13:50 +01:00
Mark Thompson
9203aac228 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.
2017-04-30 16:07:16 +01:00
Mark Thompson
b43b95f478 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.
2017-04-30 14:09:05 +01:00
Anton Khirnov
831018b0bb 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>
2017-04-28 13:47:20 +02:00
Martin Storsjö
e1c2453a4f 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>
2017-04-28 12:02:14 +03:00
Seppo Tomperi
0d4d435137 hevc: Add NEON add_residual for bitdepth 8
Optimized by Alexandra Hájková.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-04-27 23:05:27 +03:00
Vittorio Giovara
970c76f322 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>
2017-04-27 14:19:54 -04:00
Vittorio Giovara
dd3aa85b68 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>
2017-04-27 14:19:50 -04:00
James Almer
c7bf98d437 avprobe: use av_spherical_projection_name() to print spherical projection names
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-27 09:59:54 -04:00
James Almer
498864fe80 dump: use av_spherical_projection_name() to print spherical projection names
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-27 09:59:54 -04:00
James Almer
ad52eef997 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>
2017-04-27 09:59:54 -04:00
Mark Thompson
7acb90333a vaapi: Add external control of allow-profile-mismatch
Uses the just-added ALLOW_PROFILE_MISMATCH flag.
2017-04-26 22:58:19 +01:00
Mark Thompson
64a5260c69 lavc: Add flag to allow profile mismatch with hardware decoding 2017-04-26 22:57:57 +01:00
Mark Thompson
6af014f402 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.)
2017-04-26 22:00:33 +01:00
Vittorio Giovara
85c2bf9d2c avfoundation: update to use AVCodecParameters 2017-04-26 11:47:31 -04:00
Vittorio Giovara
94c54d97e7 mlp: Factor out channel layout subset checks 2017-04-26 11:21:27 -04:00
Vittorio Giovara
cea7fd9afb mlp: Drop ff_ prefix from a static function 2017-04-26 11:21:18 -04:00
Vittorio Giovara
1f6e5dd4d4 mlp: Rename the channel layout variable
Purely cosmetic change, will make code more readable once the new
channel layout takes over.
2017-04-26 11:14:57 -04:00
James Almer
bee89ed3ec 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>
2017-04-26 09:12:47 +02:00
Anton Khirnov
04b0f0e371 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.
2017-04-26 09:05:28 +02:00
Alexandra Hájková
3d69dd65c6 hevc: Add support for bitdepth 10 for IDCT DC
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-04-25 22:48:45 +03:00
Seppo Tomperi
358adef030 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>
2017-04-25 22:48:45 +03:00
Diego Biurrun
d0ce0634e0 clearvideo: Convert to the new bitstream reader 2017-04-25 15:39:12 +02:00
Kostya Shishkov
189157c3fc Add ClearVideo decoder
Only I-frames are decoded for now.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-04-25 15:39:10 +02:00
Luca Barbato
c55f2ae2b8 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>
2017-04-25 00:38:07 +02:00
Paul B Mahol
b812db66af 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>
2017-04-25 00:38:07 +02:00
Paul B Mahol
7c25523cc8 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>
2017-04-25 00:38:07 +02:00
Luca Barbato
8c0cadd17e 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
2017-04-25 00:38:07 +02:00
Luca Barbato
41262498ff configure: Fix sem_timedwait probe
It requires pthreads.
2017-04-25 00:38:07 +02:00
Luca Barbato
44aafa3325 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>
2017-04-25 00:38:07 +02:00
Anton Khirnov
3889dfde9c dca: Move the downmix request check outside the loop 2017-04-25 00:38:07 +02:00
Sean McGovern
2e1ab6a67d vc1dec: raise an error if sprite picture data is missing
Bug-Id: 1013
CC: libav-stable@libav.org
2017-04-24 18:28:55 -04:00
Diego Biurrun
ecc5c4db2d 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
2017-04-24 16:10:06 +02:00
Diego Biurrun
f25609ff06 doc/examples/filter_audio: const correctness
doc/examples/filter_audio.c:168:17: warning: assignment discards ‘const’ qualifier from pointer target type
2017-04-24 16:10:05 +02:00