Commit Graph

82577 Commits

Author SHA1 Message Date
Hendrik Leppkes 93cd6dd488 Merge commit '02c2761973dfc886e94a60a9c7d6d30c296d5b8c'
* commit '02c2761973dfc886e94a60a9c7d6d30c296d5b8c':
  avconv_qsv: use the device creation API

Not merged, our ffmpeg hwaccel infra is not quite the same as avconvs.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 17:26:53 +01:00
Hendrik Leppkes 4945343606 Merge commit '232399e3ee219d16d0e0d482c9f31a26202d4993'
* commit '232399e3ee219d16d0e0d482c9f31a26202d4993':
  avconv: pass the hwaccel frames context to the decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 17:25:23 +01:00
Hendrik Leppkes 7c282d0c75 Merge commit 'a3a0230a9870b9018dc7415ae5872784d524cfe5'
* commit 'a3a0230a9870b9018dc7415ae5872784d524cfe5':
  avconv: init filtergraphs only after we have a frame on each input

This commit is a noop since it doesn't apply cleanly due to differences
in the dataflow between avconv and ffmpeg, and thus fixing this in the
scope of a merge is unfeasible.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 17:25:05 +01:00
Hendrik Leppkes f761d49670 Merge commit '3e265ca58f0505470186dce300ab66a6eac3978e'
* commit '3e265ca58f0505470186dce300ab66a6eac3978e':
  avconv: do packet ts rescaling in write_packet()

This commit is a noop since it doesn't apply cleanly due to differences
in the dataflow between avconv and ffmpeg, and thus fixing this in the
scope of a merge is unfeasible.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 17:23:57 +01:00
Hendrik Leppkes 198e8b8e77 Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5'
* commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5':
  avconv: decouple configuring filtergraphs and setting output parameters

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 15:33:39 +01:00
Hendrik Leppkes 6b449a1290 Merge commit 'ba7397baef796ca3991fe1c921bc91054407c48b'
* commit 'ba7397baef796ca3991fe1c921bc91054407c48b':
  avconv: factor out initializing stream parameters for encoding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 15:17:00 +01:00
Hendrik Leppkes ca7cdffb70 ffmpeg_filter: fix hwaccel transcoding
Based on a patch by Yogender Gupta <ygupta@nvidia.com>
2016-11-13 15:16:14 +01:00
Andreas Cadhalpun 7112b56a34 vp9_mc_template: limit assert to SCALED == 0
The handling of the other block sizes was limited to 'SCALED == 0' in
commit dc96c0f9fc, so this assert should
be disabled, too, as it can now be triggered.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-13 12:38:15 +01:00
Hendrik Leppkes 0539ff0e1b configure: use check_lib2 for cuda and cuvid
Fixes building for Windows x86 with MSVC using the link libraries distributed with the CUDA SDK.

check_lib2 is required here because it includes the header to get the full signature of the
function, including the stdcall calling convention and all of its arguments, which enables
the linker to determine the fully qualified object name and resolve it through the import
library, since the CUDA SDK libraries do not include un-qualified aliases.
2016-11-13 12:19:15 +01:00
Vlad Tarca 2bd83ef26a avformat: Add Pro-MPEG CoP #3-R2 FEC protocol
Pro-MPEG Code of Practice #3 release 2 forward error correction for rtp_mpegts streams

Signed-off-by: Vlad Tarca <vtarca@mobibase.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-13 11:38:15 +01:00
Nicolas George 183ce55b0d lavfi: split frame_count between input and output.
AVFilterLink.frame_count is supposed to count the number of frames
that were passed on the link, but with min_samples, that number is
not always the same for the source and destination filters.
With the addition of a FIFO on the link, the difference will become
more significant.

Split the variable in two: frame_count_in counts the number of
frames that entered the link, frame_count_out counts the number
of frames that were sent to the destination filter.
2016-11-13 10:41:16 +01:00
Nicolas George 22aa649c13 fate/colorkey: disable audio stream.
The test is not supposed to cover audio.
Also, using -vframes along with an audio stream depends on
the exact order the frames are processed by filters, it is
too much constraint to guarantee.
2016-11-13 10:41:16 +01:00
Marton Balint 0f8b852a64 lavfi/ebur128: specify scaling_factor directly
This should fix build with Solaris CC.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-13 03:11:16 +01:00
Marton Balint e20e9b9033 lavf/fifo: fix undefined behaviour in deinit when destroying mutex
Reviewed-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-13 03:10:36 +01:00
Marton Balint d318e06024 ffmpeg: add newline to avformat_write_header error message
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-13 03:10:08 +01:00
James Almer 66453b1fba avformat/mov: zero initialize codec_name in mov_parse_stsd_video()
Fixes valgrind warning about "Conditional jump or move depends on uninitialised value(s)"

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-12 20:52:22 -03:00
James Almer f6f1fc2db1 fate: fix fate-api dependencies
No need to run the whole fate-lavf set. fate-lavf-flv_fmt is enough to
create the required source file.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-12 20:09:00 -03:00
Robert Nagy c0dc9df2cc increment initial_prog_date_time when removing old segments
Fixes https://trac.ffmpeg.org/ticket/5940#ticket

Reviewed-by: Michael Niedermayer <<michael@niedermayer.cc>>
Signed-off-by: Robert Nagy <ronag89@gmail.com>
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2016-11-12 17:15:28 +08:00
Michael Niedermayer 04bd1b38ee avcodec/htmlsubtitles: Fix reading one byte beyond the array
Fixes: fuzz-2-ffmpeg_SUBTITLE_AV_CODEC_ID_SUBRIP_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-12 03:23:03 +01:00
Andreas Cadhalpun cdb5479c9d pnmdec: make sure v is capped by maxval
Otherwise put_bits can be called with a value that doesn't fit in the
sample_len, causing an assertion failure.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-12 01:36:47 +01:00
Andreas Cadhalpun 484151df7c pnm: limit maxval to UINT16_MAX
From 'man ppm': The maximum color value (Maxval), again in ASCII decimal.
                Must be less than 65536.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-12 01:36:47 +01:00
Andreas Cadhalpun 360bc0d90a smvjpegdec: make sure cur_frame is not negative
This fixes a heap-buffer-overflow detected by AddressSanitizer.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-12 01:36:47 +01:00
Marton Balint 005d058f42 lavfi/loudnorm: add an internal libebur128 library
Also contains the following changes to the library:
- add ff_ prefix to functions
- remove cplusplus defines.
- add FF_ prefix to contants and some structs
- remove true peak calculation feature, since it uses its own resampler, and
  af_loudnorm does not need it.
- remove version info and some fprintf(stderr) functions
- convert to use av_malloc
- always use histogram mode for LRA calculation, otherwise LRA data is slowly
  consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
  BSD style linked list implementation which is probably not available on all
  platforms. So let's just remove the classic mode which not uses histogram.
- add ff_thread_once for calculating static histogram tables
- convert some functions to void which cannot fail
- remove intrinsics and some unused headers
- add support for planar audio
- remove channel / sample rate changer function, in ffmpeg usually we simply
  alloc a new context
- convert some static variables to defines
- declare static histogram variables as aligned
- convert some initalizations to mallocz
- add window size parameter to init function and remove window size setter
  function
- convert return codes to AVERROR
- fix indentation

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-11 19:37:54 +01:00
Marton Balint 7b8445f03d tools: add loudnorm script example to use loudnorm
Based on a patch by Kyle Swanson <k@ylo.ph>.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-11 19:22:52 +01:00
Lou Logan 872b358903 doc/encoders: sort list into alphabetical order
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-11-10 14:41:37 -09:00
Tom Butterworth 48f0e41c30 doc/encoders: add documentation for the Hap encoder
Documents options and behaviour, noting when 'chunks' option will
not be honoured.

Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
Signed-off-by: Martin Vignali <martin.vignali@gmail.com>
2016-11-10 14:08:30 -09:00
Andreas Cadhalpun 89eb398c7f icodec: correctly check avio_read return value
It can read less than the requested amount, in which case buf contains
uninitialized data, causing problems like segmentation faults later on.

Also make sure that image->size is positive, so that it can't match a
negative error code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-10 22:02:49 +01:00
Andreas Cadhalpun c82b8ef0e4 dvbsubdec: fix division by zero in compute_default_clut
This problem was introduced in commit
4b90dcb849.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-10 21:01:59 +01:00
Andreas Cadhalpun 1e33035ee7 proresdec_lgpl: explicitly check coff[3] against slice_data_size
The implicit checks via v_data_size and a_data_size don't work in the case
'(hdr_size > 7) && !ctx->alpha_info'.

This fixes segmentation faults due to invalid reads.

This problem was introduced in commit
547c2f002a.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-10 21:00:44 +01:00
Sasi Inguva 18108f3618 lavc/utils.c: Make sure skip_samples never goes negative.
Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 17:44:47 +01:00
Sasi Inguva c8dc11bb9e lavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe search fails.
Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 17:44:47 +01:00
Tom Butterworth bd6fa80d56 avcodec/hap: add "compressor" option to Hap encoder to disable secondary compression
The secondary compression in Hap is optional, this change exposes that option to
the user as some use-cases favour higher bitrate files to reduce workload
decoding.
Adds "none" or "snappy" as options for "compressor". Selecting "none" disregards
"chunks" option: chunking is only of benefit decompressing Snappy.

Reviewed-by: Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2016-11-10 14:27:38 +00:00
Carl Eugen Hoyos 08be65a075 lavc/hevc_ps: Fix an error message. 2016-11-10 08:22:26 +01:00
Carl Eugen Hoyos edb8af6e92 lavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.
Fixes part of ticket #5544.
2016-11-10 08:11:12 +01:00
Steven Liu 863ebe6f83 avformat/flvenc: add add_keyframe_index option
Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
 1. read live streaming or file by sequence
 2. if use add_keyframe_index option, add a mark flag at the position,
    use to insert new context at the last step.
 3. add the keyframes *offset* and *timestamp* into a list
 4. if use add_keyframe_index option, shift the metadata data from
    mark flag offset
 5. insert the keyframes *offset* and *timestamp* from the list by
    sequence
 6. free the list
 7. end.

Add FATE test case;

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 10:30:48 +08:00
Michael Niedermayer 2bc66d9e43 nut: add gray12 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 01:18:43 +01:00
Luca Barbato 19be5fb728 swscale: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:49:29 +01:00
Luca Barbato 638b216d4f pixfmt: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:42:48 +01:00
Michael Niedermayer b828788d58 swscale: Add GBRAP10 output
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Luca Barbato 2c7d8cbd66 swscale: Add the GBRAP12 output
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Michael Niedermayer 873d06c76e swscale/output: Fix alpha shift in yuv2gbrp_full_X_c()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Michael Niedermayer a340cfef82 swscale/input: Fix alpha bswap for set readAlpPlanar
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Michael Niedermayer d736b52a04 swscale: Drop is9_OR_10BPS() use, its name is not correct
Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Andreas Cadhalpun 226d35c845 escape124: reject codebook size 0
It causes a cb_depth of 32, leading to assertion failures in get_bits.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:59 +01:00
Andreas Cadhalpun d54c95a143 icodec: add ico_read_close to fix leaking ico->images
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:41 +01:00
Andreas Cadhalpun 467eece1be icodec: fix leaking pkt on error
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:35 +01:00
Steven Liu ab6ffc2a08 MAINTAINERS: Add myself to flvenc
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-09 17:49:19 +01:00
Andreas Cadhalpun 1bbb18fe82 mpegts: prevent division by zero
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-08 22:27:11 +01:00
Andreas Cadhalpun ff100c9dd9 matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header
The code assumes that s->streams[0] is valid.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-08 20:17:31 +01:00
Tom Butterworth 0a24587588 avcodec/hap: pass texture-compression destination as argument, not in context
This allows a subsequent change to compress directly into the output packet when possible.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2016-11-08 17:05:27 +00:00