ffmpeg.git
10 months agoavfilter/af_headphone: fix filtering of non-power of 2 length IRs in time domain
Paul B Mahol [Sat, 22 Dec 2018 19:44:15 +0000 (20:44 +0100)]
avfilter/af_headphone: fix filtering of non-power of 2 length IRs in time domain

10 months agoavformat/mpegts: unset DTS/PTS for subtitle PES packets if PCR not available
Jan Ekström [Sat, 15 Dec 2018 18:50:41 +0000 (20:50 +0200)]
avformat/mpegts: unset DTS/PTS for subtitle PES packets if PCR not available

Fixes issues when a subtitle packet is received before PCR for the
program has been received, leading to wildly jumping timestamps
on the lavf client side as well as in the re-ordering logic.

This usually happens in case of multiplexes where the PCR of a
program is not taken into account with subtitle tracks' DTS/PTS.

10 months agocbs_av1: Fix reading of overlong uvlc codes
Mark Thompson [Sun, 2 Dec 2018 20:49:24 +0000 (20:49 +0000)]
cbs_av1: Fix reading of overlong uvlc codes

The specification allows 2^32-1 to be encoded as any number of zeroes
greater than 31, followed by a one.  This previously failed because the
trace code would overflow the array containing the string representation
of the bits if there were more than 63 zeroes.  Fix that by splitting the
trace output into batches, and at the same time move it out of the default
path.

(While this seems likely to be a specification error, libaom does support
it so we probably should as well.)

From a test case by keval shah <skeval65@gmail.com>.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/avio: fix avio_feof documentation
Marton Balint [Sat, 8 Dec 2018 22:05:45 +0000 (23:05 +0100)]
avformat/avio: fix avio_feof documentation

It has been this way too long to change behaviour, so let's change the docs
instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
10 months agopostproc/postprocess_template: remove FF_REG_sp from clobber list
Michael Niedermayer [Thu, 20 Dec 2018 21:40:06 +0000 (22:40 +0100)]
postproc/postprocess_template: remove FF_REG_sp from clobber list

Future gcc may no longer support this

Tested-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agopostproc/postprocess_template: Avoid using %4 for the threshold compare
Michael Niedermayer [Thu, 20 Dec 2018 21:40:05 +0000 (22:40 +0100)]
postproc/postprocess_template: Avoid using %4 for the threshold compare

This avoids problems if %4 is the stack pointer
the constraints do not allow %4 to be the stack pointer but gcc 9 may
no longer support specifying such constraints

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavfilter/af_sofalizer: fix non-power of 2 IR length filtering in time domain
Paul B Mahol [Sat, 22 Dec 2018 15:19:21 +0000 (16:19 +0100)]
avfilter/af_sofalizer: fix non-power of 2 IR length filtering in time domain

10 months agoavformat/vividas: check if viv->sb_pb is not NULL
Paul B Mahol [Sat, 22 Dec 2018 12:36:36 +0000 (13:36 +0100)]
avformat/vividas: check if viv->sb_pb is not NULL

10 months agoavformat/vividas: check if size is enough big in xor_block
Paul B Mahol [Sat, 22 Dec 2018 09:45:22 +0000 (10:45 +0100)]
avformat/vividas: check if size is enough big in xor_block

10 months agoavformat/vividas: fix undefined behaviour
Paul B Mahol [Sat, 22 Dec 2018 09:39:03 +0000 (10:39 +0100)]
avformat/vividas: fix undefined behaviour

10 months agoavformat/vividas: check if value from ffio_read_varlen() is too big
Paul B Mahol [Sat, 22 Dec 2018 09:37:55 +0000 (10:37 +0100)]
avformat/vividas: check if value from ffio_read_varlen() is too big

10 months agoAPIChanges: add missing entry for SMPTE2094-40 HDR Dynamic metadata API
James Almer [Sat, 22 Dec 2018 00:24:00 +0000 (21:24 -0300)]
APIChanges: add missing entry for SMPTE2094-40 HDR Dynamic metadata API

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agolavc/opus_rc: Cast a const pointer to uint8_t *.
Carl Eugen Hoyos [Mon, 17 Dec 2018 01:36:26 +0000 (02:36 +0100)]
lavc/opus_rc: Cast a const pointer to uint8_t *.

Silences a warning with clang on arm:
libavcodec/opus_rc.c:170:17: warning: passing 'const uint8_t *' (aka 'const unsigned char *') to parameter of type 'void *' discards qualifiers

10 months agoAdd HDR dynamic metadata struct (for SMPTE 2094-40) to libavutil
Mohammad Izadi [Fri, 21 Dec 2018 16:45:48 +0000 (17:45 +0100)]
Add HDR dynamic metadata struct (for SMPTE 2094-40) to libavutil

The dynamic metadata contains data for color volume transform -
application 4 of SMPTE 2094-40:2016 standard. The data comes from
HEVC in the SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 months agoavfilter/af_headphone: use fabsf() instead of fabs()
Paul B Mahol [Fri, 21 Dec 2018 11:06:03 +0000 (12:06 +0100)]
avfilter/af_headphone: use fabsf() instead of fabs()

10 months agoavfilter/af_sofalizer: use fabsf() instead of fabs()
Paul B Mahol [Fri, 21 Dec 2018 10:53:44 +0000 (11:53 +0100)]
avfilter/af_sofalizer: use fabsf() instead of fabs()

10 months agolibavformat/mov: Fix NULL-dereference read for some encrypted content.
Jacob Trimble [Thu, 20 Dec 2018 00:00:22 +0000 (16:00 -0800)]
libavformat/mov: Fix NULL-dereference read for some encrypted content.

When reading frames, we need to use the fragment for the correct
stream.  Sometimes the "current" fragment is not the same as the one
the frame is for.

Found by Chromium's ClusterFuzz:
https://crbug.com/906392 and https://crbug.com/915524

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/cbs_av1: fix parsing delta_frame_id_minus1
James Almer [Thu, 20 Dec 2018 15:26:43 +0000 (12:26 -0300)]
avcodec/cbs_av1: fix parsing delta_frame_id_minus1

delta_frame_id_minus1 is not a single value in the bitstream, and can
store values up to 17 bits wide.

Fixes parsing files with frame ids.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoavcodec/vc1_parser: use init_get_bits8()
Paul B Mahol [Thu, 20 Dec 2018 20:19:56 +0000 (21:19 +0100)]
avcodec/vc1_parser: use init_get_bits8()

10 months agoavfilter/af_sofalizer: add framesize option
Paul B Mahol [Thu, 20 Dec 2018 19:22:36 +0000 (20:22 +0100)]
avfilter/af_sofalizer: add framesize option

10 months agoavformat: add vividas demuxer
Paul B Mahol [Mon, 10 Dec 2018 11:15:50 +0000 (12:15 +0100)]
avformat: add vividas demuxer

10 months agoavfilter/af_sofalizer: increase max radius
Paul B Mahol [Thu, 20 Dec 2018 18:20:30 +0000 (19:20 +0100)]
avfilter/af_sofalizer: increase max radius

10 months agoavfilter/af_sofalizer: add printing of license back
Paul B Mahol [Thu, 20 Dec 2018 12:42:20 +0000 (13:42 +0100)]
avfilter/af_sofalizer: add printing of license back

10 months agolavc/libkvazaar: indent the code
Jun Zhao [Sat, 15 Dec 2018 11:20:41 +0000 (19:20 +0800)]
lavc/libkvazaar: indent the code

indent the code to follow FFmpeg's coding style

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
10 months agolavc/libkvazaar: Use avctx->frame_rate first for framerate setting
Jun Zhao [Sat, 15 Dec 2018 09:12:46 +0000 (17:12 +0800)]
lavc/libkvazaar: Use avctx->frame_rate first for framerate setting

perfer avctx->frame_rate first than use avctx->time_base when setting
the frame rate to encoder.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
10 months agolavc/options_table: Change some options location in opt table.
Jun Zhao [Sat, 15 Dec 2018 02:22:43 +0000 (10:22 +0800)]
lavc/options_table: Change some options location in opt table.

Change the some options location in avcodec_options to make code more
readable. And update the fate test with this change.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
10 months agoconfigure: make --windres option work
Peter Ross [Thu, 20 Dec 2018 00:39:39 +0000 (11:39 +1100)]
configure: make --windres option work

this option is described by --help, but the definition was missing in CMDLINE_SET.

10 months agoconfigure: --help should dipslay --host-extralibs
Peter Ross [Thu, 20 Dec 2018 00:39:14 +0000 (11:39 +1100)]
configure: --help should dipslay --host-extralibs

10 months agoconfigure: --help typo
Peter Ross [Thu, 20 Dec 2018 00:38:31 +0000 (11:38 +1100)]
configure: --help typo

10 months agoavcodec/rpza: Check that there is enough data for all the blocks
Michael Niedermayer [Sun, 16 Dec 2018 18:13:27 +0000 (19:13 +0100)]
avcodec/rpza: Check that there is enough data for all the blocks

Fixes: Timeout
Fixes: 11547/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RPZA_fuzzer-5678435842654208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/rpza: Move frame allocation to a later point
Michael Niedermayer [Sun, 16 Dec 2018 18:04:56 +0000 (19:04 +0100)]
avcodec/rpza: Move frame allocation to a later point

This will allow performing some fast checks before the slow allocation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/mov: Simplify get_stream_info_time()
Michael Niedermayer [Fri, 7 Dec 2018 20:38:25 +0000 (21:38 +0100)]
avformat/mov: Simplify get_stream_info_time()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/avcodec: Document the data type for AV_PKT_DATA_MPEGTS_STREAM_ID
Michael Niedermayer [Fri, 7 Dec 2018 20:52:30 +0000 (21:52 +0100)]
avcodec/avcodec: Document the data type for AV_PKT_DATA_MPEGTS_STREAM_ID

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/mpegts: Fix side data type for stream id
Michael Niedermayer [Fri, 7 Dec 2018 20:51:48 +0000 (21:51 +0100)]
avformat/mpegts: Fix side data type for stream id

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agotests/fate/filter-video: increase fuzz for fate-filter-refcmp-psnr-rgb
Michael Niedermayer [Thu, 6 Dec 2018 20:51:22 +0000 (21:51 +0100)]
tests/fate/filter-video: increase fuzz for fate-filter-refcmp-psnr-rgb

Fixes: test failure on powerpc

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agolibavcodec/libaomenc: fix breakage from upstream
Helmut K. C. Tessarek [Wed, 19 Dec 2018 17:13:26 +0000 (18:13 +0100)]
libavcodec/libaomenc: fix breakage from upstream

commit https://aomedia.googlesource.com/aom/+/4667aa1a373566e9c124afcd58c71731ab0d7377
changed parts of the code that broke compilation of libavcodec/libaomenc.c

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agolavu/internal: Replace an empty loop with "do {}".
Carl Eugen Hoyos [Mon, 17 Dec 2018 19:33:24 +0000 (20:33 +0100)]
lavu/internal: Replace an empty loop with "do {}".

Silences a clang warning when not compiling for x86:
libswscale/utils.c:345:13: warning: while loop has empty body

Suggested-by: Nicolas George
10 months agoavcodec/mjpegdec: Fix indention of ljpeg_decode_yuv_scan()
Michael Niedermayer [Tue, 18 Dec 2018 13:27:48 +0000 (14:27 +0100)]
avcodec/mjpegdec: Fix indention of ljpeg_decode_yuv_scan()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/mjpegdec: verify SOF len field validity
Michael Niedermayer [Tue, 18 Dec 2018 13:25:53 +0000 (14:25 +0100)]
avcodec/mjpegdec: verify SOF len field validity

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agodoc/encoders: Fix colums typo
Michael Niedermayer [Tue, 18 Dec 2018 13:20:38 +0000 (14:20 +0100)]
doc/encoders: Fix colums typo

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoffmpeg: improve the intra stream discontinuity message
Jan Ekström [Tue, 9 Oct 2018 22:50:08 +0000 (01:50 +0300)]
ffmpeg: improve the intra stream discontinuity message

Now it actually tells which stream from which input and of
which type had an absolute DTS discontinuity larger than
dts_delta_threshold.

10 months agoavformat/vorbiscomment: add support for writing chapters
Paul B Mahol [Sun, 16 Dec 2018 20:50:08 +0000 (21:50 +0100)]
avformat/vorbiscomment: add support for writing chapters

Fixes #7532.

10 months agoavcodec/g723_1dec: improve stereo support
Paul B Mahol [Tue, 18 Dec 2018 17:57:18 +0000 (18:57 +0100)]
avcodec/g723_1dec: improve stereo support

10 months agoavcodec/g723_1dec: reindent after last commit
Paul B Mahol [Sat, 15 Dec 2018 12:22:52 +0000 (13:22 +0100)]
avcodec/g723_1dec: reindent after last commit

10 months agoavcodec/g723_1: add support for stereo files
Paul B Mahol [Sat, 15 Dec 2018 12:20:43 +0000 (13:20 +0100)]
avcodec/g723_1: add support for stereo files

10 months agolavc/mjpegdec: Interpret three-component Adobe transform 0 also as RGB.
Carl Eugen Hoyos [Tue, 18 Dec 2018 17:00:31 +0000 (18:00 +0100)]
lavc/mjpegdec: Interpret three-component Adobe transform 0 also as RGB.

While there, make a comparison with "RGB" more readable.

Fixes ticket #7625.

10 months agoavfilter/scene_sad: Fix funtions typos
Michael Niedermayer [Tue, 18 Dec 2018 13:13:56 +0000 (14:13 +0100)]
avfilter/scene_sad: Fix funtions typos

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/mips: [loongson] enable MSA optimization for loongson platform.
Shiyou Yin [Mon, 17 Dec 2018 10:03:30 +0000 (18:03 +0800)]
avcodec/mips: [loongson] enable MSA optimization for loongson platform.

Set initialization order of MSA after MMI to make it work on loongson platform(msa is supported by loongson2k、3a4000 etc.).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agolavc/qsv_hevc: correct QSV HEVC default plugin on Windows
Zhong Li [Wed, 12 Dec 2018 07:03:21 +0000 (15:03 +0800)]
lavc/qsv_hevc: correct QSV HEVC default plugin on Windows

1. Old logic meaned: everywhere, except Windows, ffmpeg has to use HW
acceleration, but on Windows ffmpeg has to use (unavailable) software
HEVC by default
2. Software HEVC is available only if you provide corresponding
software MediaSDK library, which isn't provided with ffmpeg. More
information could be found in
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/samples/readme-encode_linux.pdf
3. HW HEVC decoding/encoding are available on Windows in the driver by default

Note: Default case should be the most common case but this change still has potential risk
on windows if HW path is not supported(or doesn't work as expection).
(See the historical disscution: https://lists.libav.org/pipermail/libav-devel/2016-November/080419.html).
In such case, two options suggested:
1. Use the option "-load_plugin hevc_sw" to switch SW path manually.
2. Or report bug to Intel windows driver if your GPU can support HEVC HW codec.
  (HEVC decoding is supported since Braswell, and encoding supported since Skylake)

Patch started by Landgraph. Add similar change for hevc decoder and bump a new version.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Signed-off-by: Landgraph <me@landgraph.ru>
Signed-off-by: Zhong Li <zhong.li@intel.com>
10 months agolavf/mov: document the dvh1 codec switch based on hvcC availability
Jan Ekström [Mon, 3 Dec 2018 01:15:29 +0000 (03:15 +0200)]
lavf/mov: document the dvh1 codec switch based on hvcC availability

10 months agolavf/isom: add Dolby Vision sample entry codes for HEVC and H.264
Rodger Combs [Mon, 5 Nov 2018 16:26:24 +0000 (10:26 -0600)]
lavf/isom: add Dolby Vision sample entry codes for HEVC and H.264

These are registered identifiers at the MPEG-4 RA, which are
defined as to be utilized for Dolby Vision AVC/HEVC streams that
are not correctly presentable by standards-compliant AVC/HEVC players.

According to the Dolby Vision specification for ISOBMFF, these sample
entry codes are specified to have the standard AVC or HEVC decoder
configuration box in addition to the Dolby custom DOVIConfigurationBox.
This is what enables us to decode the streams without custom parsing.

For correct presentation information from the DOVIConfigurationBox
is required (YCbCr or modified ICtCP, SDR or HDR, base or enhancement
layer).

10 months agoavformat/mxfenc: fix typo
Paul B Mahol [Mon, 17 Dec 2018 20:06:36 +0000 (21:06 +0100)]
avformat/mxfenc: fix typo

10 months agoavfilter/af_apad: add pad_dur and whole_dur options
Paul B Mahol [Sun, 16 Dec 2018 16:00:56 +0000 (17:00 +0100)]
avfilter/af_apad: add pad_dur and whole_dur options

10 months agolavf/id3v2: fail read_apic on EOF reading mimetype
chcunningham [Fri, 14 Dec 2018 21:44:07 +0000 (13:44 -0800)]
lavf/id3v2: fail read_apic on EOF reading mimetype

avio_read may return EOF, leaving the mimetype array unitialized. fail
early when this occurs to avoid using the array in an unitialized state.

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agolavfi/program_opencl: Do not use format specifier "z" on Windows.
Carl Eugen Hoyos [Mon, 17 Dec 2018 13:44:10 +0000 (14:44 +0100)]
lavfi/program_opencl: Do not use format specifier "z" on Windows.

10 months agolavc/cbs: Do not use format specifier "z" on Windows.
Carl Eugen Hoyos [Mon, 17 Dec 2018 13:39:41 +0000 (14:39 +0100)]
lavc/cbs: Do not use format specifier "z" on Windows.

10 months agoavformat/dashenc: Added support for Low-latency HLS(Experimental)
kjeyapal@akamai.com [Wed, 12 Dec 2018 16:20:19 +0000 (21:50 +0530)]
avformat/dashenc: Added support for Low-latency HLS(Experimental)

Apple doesn't have an official spec for LHLS. Meanwhile hls.js player folks are
trying to standardize a open LHLS spec. The draft spec is available in https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md
This option will also try to comply with the above open spec, till Apple's spec officially supports it.
Applicable only when @var{streaming} and @var{hls_playlist} options are enabled.

10 months agoavformat/dashenc : Refactored HLS media playlist related code
kjeyapal@akamai.com [Wed, 12 Dec 2018 16:20:18 +0000 (21:50 +0530)]
avformat/dashenc : Refactored HLS media playlist related code

Made it as a separate function, so that it could be reused (in future)

10 months agoconfigure: Use "clang" as cc_default for Android.
Carl Eugen Hoyos [Thu, 6 Dec 2018 23:11:17 +0000 (00:11 +0100)]
configure: Use "clang" as cc_default for Android.

10 months agoavcodec/tiff: add support for 12bit grayscale images
Paul B Mahol [Fri, 14 Dec 2018 16:32:25 +0000 (17:32 +0100)]
avcodec/tiff: add support for 12bit grayscale images

Fixes #4688.

10 months agoavcodec/rasc: Check that the number of moves is less than or equal the number of...
Michael Niedermayer [Fri, 14 Dec 2018 23:10:17 +0000 (00:10 +0100)]
avcodec/rasc: Check that the number of moves is less than or equal the number of pixels

Fixes: OOM
Fixes: 10307/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5393974559244288

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/vp7: Check for end of input in vp78_decode_mv_mb_modes()
Michael Niedermayer [Sat, 15 Dec 2018 00:53:16 +0000 (01:53 +0100)]
avcodec/vp7: Check for end of input in vp78_decode_mv_mb_modes()

Fixes: Timeout
Fixes: 10313/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5637719389110272

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/nutenc: Document trailer index assert better
Michael Niedermayer [Fri, 14 Dec 2018 20:52:09 +0000 (21:52 +0100)]
avformat/nutenc: Document trailer index assert better

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agolavf/mov: ensure only one tkhd per trak
chcunningham [Thu, 13 Dec 2018 21:58:40 +0000 (13:58 -0800)]
lavf/mov: ensure only one tkhd per trak

Chromium fuzzing produced a whacky file with extra tkhds. This caused
an AVStream that was already in use to be corrupted by assigning it a
new id, which blows up later in mov_read_trun because the
MOVFragmentStreamInfo.index_entry now points OOB.

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavutil/tests/random_seed: seeds[] is uint32_t, therefore use PRIX32 macro
Peter Ross [Sat, 15 Dec 2018 01:54:43 +0000 (12:54 +1100)]
avutil/tests/random_seed: seeds[] is uint32_t, therefore use PRIX32 macro

squelch format type warning

10 months agoavutil/avsscanf: do not use long double functions
Paul B Mahol [Sat, 15 Dec 2018 08:58:28 +0000 (09:58 +0100)]
avutil/avsscanf: do not use long double functions

Not needed when only double is used.

10 months agolavc/g729dec: Cosmetics, fix indentation after last commit.
Carl Eugen Hoyos [Fri, 14 Dec 2018 23:55:18 +0000 (00:55 +0100)]
lavc/g729dec: Cosmetics, fix indentation after last commit.

10 months agolavc/g729dec: Support stereo streams.
Carl Eugen Hoyos [Fri, 14 Dec 2018 14:16:56 +0000 (15:16 +0100)]
lavc/g729dec: Support stereo streams.

Fixes ticket #4553.

10 months agoavcodec/clearvideo: Check remaining input bits in P macro block loop
Michael Niedermayer [Thu, 6 Dec 2018 00:19:37 +0000 (01:19 +0100)]
avcodec/clearvideo: Check remaining input bits in P macro block loop

Fixes: Timeout
Fixes: 11083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5657180351496192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/dvdsubdec: discard accumulated buffer on error
Michael Niedermayer [Wed, 5 Dec 2018 23:09:37 +0000 (00:09 +0100)]
avcodec/dvdsubdec: discard accumulated buffer on error

Fixes: Timeout
Fixes: 10992/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5657495410835456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/rasc: Check input space before reading chunk
Michael Niedermayer [Wed, 5 Dec 2018 01:18:51 +0000 (02:18 +0100)]
avcodec/rasc: Check input space before reading chunk

Fixes: Timeout
Fixes: 11118/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5652564066959360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/nutdec: fix pts overflow
Paul B Mahol [Fri, 14 Dec 2018 20:48:17 +0000 (21:48 +0100)]
avformat/nutdec: fix pts overflow

Probably fixes #6913.

10 months agoswscale/output: VSX-optimize 16-bit yuv2plane1
Lauri Kasanen [Thu, 13 Dec 2018 12:07:58 +0000 (14:07 +0200)]
swscale/output: VSX-optimize 16-bit yuv2plane1

./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p16le \
-f null -vframes 100 -v error -nostats -

2120 UNITS in planar1,   65393 runs,    143 skips

-cpuflags 0

19157 UNITS in planar1,   65512 runs,     24 skips

9.03632 speedup, 16be similarly.

Fate passes, each format tested with an image to video conversion.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/mpeg: Initialize quarter_sample parameter from previous thread.
Andriy Gelman [Thu, 13 Dec 2018 04:57:35 +0000 (23:57 -0500)]
avcodec/mpeg: Initialize quarter_sample parameter from previous thread.

Fixes #7410.
The value of sub-pixel precision for me/mc can change during an Intra frame. In multi-threaded decoding this change is not propagated to other frame threads causing decoding artifacts. This patch initializes the sub-pixel precision parameter from previous thread, which fixes the issue.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/ffmetadec: do no limit size of tags to 1024
Paul B Mahol [Thu, 13 Dec 2018 12:06:30 +0000 (13:06 +0100)]
avformat/ffmetadec: do no limit size of tags to 1024

Use bprint API instead.

Fixes #4833.

10 months agoavcodec/ass_split: fix a memory leak defect when realloc fails
Fan Gang [Tue, 13 Feb 2018 07:38:59 +0000 (15:38 +0800)]
avcodec/ass_split: fix a memory leak defect when realloc fails

Fixes #7019.

10 months agodoc/metadata: fix error in timebase description
Paul B Mahol [Fri, 14 Dec 2018 11:56:13 +0000 (12:56 +0100)]
doc/metadata: fix error in timebase description

Fixes #7184.

10 months agoavformat/movenc: treat ALAC same as FLAC and write correct info
Paul B Mahol [Fri, 14 Dec 2018 11:10:25 +0000 (12:10 +0100)]
avformat/movenc: treat ALAC same as FLAC and write correct info

Fixes #7291.

10 months agoavformat/id3v2: use png header to get PNG signature
Paul B Mahol [Fri, 14 Dec 2018 10:34:46 +0000 (11:34 +0100)]
avformat/id3v2: use png header to get PNG signature

10 months agoavformat/flac_picture: try to guess PNG by actual picture data
Paul B Mahol [Thu, 13 Dec 2018 19:12:52 +0000 (20:12 +0100)]
avformat/flac_picture: try to guess PNG by actual picture data

Fixes #5028.

10 months agoavformat/nut: add support for yuva444/422p12 pixel format
Paul B Mahol [Fri, 14 Dec 2018 10:26:30 +0000 (11:26 +0100)]
avformat/nut: add support for yuva444/422p12 pixel format

10 months agoavformat/nutdec: fix obvious typo
Paul B Mahol [Thu, 13 Dec 2018 22:17:00 +0000 (23:17 +0100)]
avformat/nutdec: fix obvious typo

Fixes #6742.

10 months agoavformat/mxfdec: fix error check in macro
Paul B Mahol [Thu, 13 Dec 2018 22:51:02 +0000 (23:51 +0100)]
avformat/mxfdec: fix error check in macro

Fixes #6750.

10 months agoavcodec/xfacedec: fix order of operations
Paul B Mahol [Thu, 13 Dec 2018 22:44:39 +0000 (23:44 +0100)]
avcodec/xfacedec: fix order of operations

Fixes #6745.

10 months agobump micro after recent gif changes
Paul B Mahol [Thu, 13 Dec 2018 18:16:58 +0000 (19:16 +0100)]
bump micro after recent gif changes

10 months agoavcodec/gif: use avctx->frame_number
Paul B Mahol [Thu, 13 Dec 2018 18:15:45 +0000 (19:15 +0100)]
avcodec/gif: use avctx->frame_number

10 months agoavformat/gifdec: export duration, nb_frames and comment
Paul B Mahol [Thu, 13 Dec 2018 17:37:27 +0000 (18:37 +0100)]
avformat/gifdec: export duration, nb_frames and comment

10 months agoavcodec/codec_desc: extend gif description
Paul B Mahol [Wed, 12 Dec 2018 16:16:52 +0000 (17:16 +0100)]
avcodec/codec_desc: extend gif description

10 months agoavformat/gif: extend description
Paul B Mahol [Wed, 12 Dec 2018 16:16:30 +0000 (17:16 +0100)]
avformat/gif: extend description

10 months agoavcodec/gif: enable encoding single gif image per frame
Paul B Mahol [Wed, 12 Dec 2018 12:19:33 +0000 (13:19 +0100)]
avcodec/gif: enable encoding single gif image per frame

Unbreaks gif image2 muxer.

10 months agoavformat/gifdec: export sample aspect ratio
Paul B Mahol [Wed, 12 Dec 2018 10:12:32 +0000 (11:12 +0100)]
avformat/gifdec: export sample aspect ratio

10 months agoavcodec/gif: add support for alpha
Paul B Mahol [Tue, 11 Dec 2018 18:40:17 +0000 (19:40 +0100)]
avcodec/gif: add support for alpha

Based on patch by Bjorn Roche.

Fixes #6813.

10 months agoavcodec: rewrite gif muxing and encoding
Paul B Mahol [Tue, 11 Dec 2018 10:52:17 +0000 (11:52 +0100)]
avcodec: rewrite gif muxing and encoding

Now "-c copy" works.
Update FATE files.

Demuxer only split file into packets, no data is trimmed.
Encoder & muxer currently expect completely another format
where muxer writes stuff like disposal method which should
be really encoder job.
With this patch muxer only modifies delay between two packets.
Codec copy need to have same behavior between demuxer and
muxer to work correctly.

Fixes #6640.

10 months agoavformat/utils: add support for reading ID3 tags at start of wav
Paul B Mahol [Wed, 12 Dec 2018 18:24:21 +0000 (19:24 +0100)]
avformat/utils: add support for reading ID3 tags at start of wav

Fixes #4140.

10 months agoavformat/wavdec: add support for 'id3 ' chunk
Paul B Mahol [Wed, 12 Dec 2018 18:02:30 +0000 (19:02 +0100)]
avformat/wavdec: add support for 'id3 ' chunk

Fixes #5700.

10 months agolavfi/signalstats: Cast the return value of AV_RN16() to int.
Carl Eugen Hoyos [Tue, 11 Dec 2018 02:12:49 +0000 (03:12 +0100)]
lavfi/signalstats: Cast the return value of AV_RN16() to int.

It is unsigned at least on arm, fixes the following warnings:
libavfilter/vf_signalstats.c:833:21: warning: taking the absolute value of unsigned type 'unsigned int' has no effect
            dify += abs(yuv - AV_RN16(prev->data[0] + pw + i * 2));

10 months agoopusenc: fix infinite loop if flushing encoder upon init
Rostislav Pehlivanov [Wed, 12 Dec 2018 20:05:33 +0000 (20:05 +0000)]
opusenc: fix infinite loop if flushing encoder upon init

The issue is that the afq still has samples as on init it counts
the overlap used as a delay to adjust the PTS it generates, hence
we can't rely on it right after init.
So just check to see if any frames have been encoded. frame_number
can't be anything but 0 right after init and can only be set by lavc.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
10 months agoavcodec/libdav1d: add support for 12bit streams
James Almer [Wed, 12 Dec 2018 03:06:05 +0000 (00:06 -0300)]
avcodec/libdav1d: add support for 12bit streams

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoswscale/output: VSX-optimize nbps yuv2plane1
Lauri Kasanen [Tue, 27 Nov 2018 13:26:00 +0000 (15:26 +0200)]
swscale/output: VSX-optimize nbps yuv2plane1

./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p9le \
-f null -vframes 100 -v error -nostats -

Speedups:
yuv2plane1_9BE_vsx 11.2042
yuv2plane1_9LE_vsx 11.156
yuv2plane1_10BE_vsx 9.89428
yuv2plane1_10LE_vsx 10.3637
yuv2plane1_12BE_vsx 9.71923
yuv2plane1_12LE_vsx 11.0404
yuv2plane1_14BE_vsx 10.1763
yuv2plane1_14LE_vsx 11.2728

Fate passes, each format tested with an image to video conversion.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agodoc/indevs: document libdc1394 options
Lou Logan [Wed, 12 Dec 2018 00:24:30 +0000 (15:24 -0900)]
doc/indevs: document libdc1394 options

Signed-off-by: Lou Logan <lou@lrcd.com>