]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agoavcodec/hevc_parser: very minor simplification in hevc_parse()
Michael Niedermayer [Sun, 30 Sep 2018 00:29:44 +0000 (02:29 +0200)]
avcodec/hevc_parser: very minor simplification in hevc_parse()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavc/hevc: Don't parse NAL unit for a dummy buffer
Haihao Xiang [Fri, 30 Mar 2018 02:42:32 +0000 (10:42 +0800)]
lavc/hevc: Don't parse NAL unit for a dummy buffer

hevc parser mistakenly reports the following message if a dummy buffer
is padded for EOF

   [hevc @ 0x559b63848610] missing picture in access unit

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Reviewed-by: "Li, Zhong" <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/libzvbi-teletextdec: add formatted ass output
Marton Balint [Sun, 29 Apr 2018 01:08:12 +0000 (03:08 +0200)]
avcodec/libzvbi-teletextdec: add formatted ass output

Inspired by the VideoLAN text decoder and its port to FFmpeg made by Aman
Gupta.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/diracdec: check that GetBitContext has not ended in codeblock()
Michael Niedermayer [Thu, 13 Sep 2018 22:22:13 +0000 (00:22 +0200)]
avcodec/diracdec: check that GetBitContext has not ended in codeblock()

Fixes: Timeout (part 2 of 2)
Fixes: 9774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5748957085958144
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/diracdec: Propagate errors from codeblock()
Michael Niedermayer [Thu, 13 Sep 2018 22:22:13 +0000 (00:22 +0200)]
avcodec/diracdec: Propagate errors from codeblock()

Consider a component to be damaged if more than 50% of its subbands are damaged

Fixes: Timeout (part 1 of 2)
Fixes: 9774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5748957085958144
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/bintext: Use ff_get_buffer instead of ff_reget_buffer and simplify
Michael Niedermayer [Wed, 12 Sep 2018 00:14:47 +0000 (02:14 +0200)]
avcodec/bintext: Use ff_get_buffer instead of ff_reget_buffer and simplify

reget seems unneeded and it is slower

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/bintext: Check input size before allocating the input image
Michael Niedermayer [Wed, 12 Sep 2018 00:11:00 +0000 (02:11 +0200)]
avcodec/bintext: Check input size before allocating the input image

Fixes: Timeout
Fixes: 9795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XBIN_fuzzer-5768631928487936
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Error out if we had insufficent input for the output frame in decompress_2()
Michael Niedermayer [Sun, 5 Aug 2018 15:22:23 +0000 (17:22 +0200)]
avcodec/gdv: Error out if we had insufficent input for the output frame in decompress_2()

Fixes: Timeout (with the previous commits to gdv.c)
Fixes: 9422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5143490001371136
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()
Michael Niedermayer [Sun, 5 Aug 2018 15:12:33 +0000 (17:12 +0200)]
avcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()
Michael Niedermayer [Sun, 5 Aug 2018 15:10:22 +0000 (17:10 +0200)]
avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Eliminate 50% of the reads in the first inner loop in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 15:06:44 +0000 (17:06 +0200)]
avcodec/gdv: Eliminate 50% of the reads in the first inner loop in rescale()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Simplify first inner loop in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:58:35 +0000 (16:58 +0200)]
avcodec/gdv: Simplify first inner loop in rescale()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Combine first and 3rd case in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:55:38 +0000 (16:55 +0200)]
avcodec/gdv: Combine first and 3rd case in rescale()

Simplifies code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Factor terms out of inner loops in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:29:13 +0000 (16:29 +0200)]
avcodec/gdv: Factor terms out of inner loops in rescale()

This also replaces some loops by memcpy()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/gdv: Replace divisions by shifts in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:13:24 +0000 (16:13 +0200)]
avcodec/gdv: Replace divisions by shifts in rescale()

Divisions tend to be slower than shifts unless the compiler optimizes them out.
And some of these are in inner loops.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/mpeg: Support demuxing HEVC in mpeg-ps.
Carl Eugen Hoyos [Wed, 26 Sep 2018 20:39:18 +0000 (22:39 +0200)]
lavf/mpeg: Support demuxing HEVC in mpeg-ps.

5 years agolavc: Add AV1 metadata bitstream filter
Mark Thompson [Sun, 9 Sep 2018 22:08:12 +0000 (23:08 +0100)]
lavc: Add AV1 metadata bitstream filter

Can adjust colour and timing information.

5 years agolavc: Add coded bitstream read/write support for AV1
Mark Thompson [Sun, 9 Sep 2018 22:08:11 +0000 (23:08 +0100)]
lavc: Add coded bitstream read/write support for AV1

5 years agoavfilter/af_afftdn: add missing break
Paul B Mahol [Wed, 26 Sep 2018 20:23:28 +0000 (22:23 +0200)]
avfilter/af_afftdn: add missing break

5 years agoavformat/matroskaenc: reindent after the previous commit
James Almer [Fri, 21 Sep 2018 19:18:36 +0000 (16:18 -0300)]
avformat/matroskaenc: reindent after the previous commit

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/matroskaenc: refactor checks for allowed codecs in WebM
James Almer [Fri, 21 Sep 2018 19:18:15 +0000 (16:18 -0300)]
avformat/matroskaenc: refactor checks for allowed codecs in WebM

Use the new ff_webm_codec_tags[] array for this purpose.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/matroskaenc: implement AVOutputFormat.query_codec for webm
James Almer [Fri, 21 Sep 2018 15:52:13 +0000 (12:52 -0300)]
avformat/matroskaenc: implement AVOutputFormat.query_codec for webm

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/matroskaenc: remove unnecessary additional codec tags
James Almer [Fri, 21 Sep 2018 15:47:02 +0000 (12:47 -0300)]
avformat/matroskaenc: remove unnecessary additional codec tags

They are listed in riff.c already.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter: add audio denoising (afftdn) filter
Paul B Mahol [Mon, 17 Sep 2018 15:41:56 +0000 (17:41 +0200)]
avfilter: add audio denoising (afftdn) filter

5 years agoRELEASE: update for git after 4.0 branchpoint
Matthieu Bouron [Tue, 25 Sep 2018 09:30:50 +0000 (11:30 +0200)]
RELEASE: update for git after 4.0 branchpoint

5 years agoavfilter/vf_curves: add planar rgb support
Paul B Mahol [Mon, 24 Sep 2018 14:57:10 +0000 (16:57 +0200)]
avfilter/vf_curves: add planar rgb support

5 years agoavformat/utils: move mkdir_p to utils
Steven Liu [Sat, 22 Sep 2018 14:10:09 +0000 (22:10 +0800)]
avformat/utils: move mkdir_p to utils

Because it will be used by avformat/segment.c or other module which
need to automatically create sub-directories operation.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavfilter/buffersink.h: fix comment typo of av_buffersink_get_samples
Steven Liu [Tue, 25 Sep 2018 03:11:37 +0000 (11:11 +0800)]
avfilter/buffersink.h: fix comment typo of av_buffersink_get_samples

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agovaapi_encode_h265: Add missing error return
Mark Thompson [Mon, 24 Sep 2018 22:02:10 +0000 (23:02 +0100)]
vaapi_encode_h265: Add missing error return

Fixes CID #1439657.

5 years agolavc/h265_profile_level: Fix level guessing with no PTL structure
Mark Thompson [Mon, 24 Sep 2018 21:55:35 +0000 (22:55 +0100)]
lavc/h265_profile_level: Fix level guessing with no PTL structure

Fixes CID #1439661.

5 years agolavc/h265_profile_level: Avoid integer overflow in bitrate
Mark Thompson [Mon, 24 Sep 2018 22:00:43 +0000 (23:00 +0100)]
lavc/h265_profile_level: Avoid integer overflow in bitrate

Fixes CIDs #1439659 and #1439660.

5 years agoh264_metadata: Avoid integer overflow in bitrate
Mark Thompson [Mon, 24 Sep 2018 21:45:50 +0000 (22:45 +0100)]
h264_metadata: Avoid integer overflow in bitrate

Fixes CID #1439664.

5 years agolavc/h264_levels: Avoid integer overflow in bitrate
Mark Thompson [Mon, 24 Sep 2018 22:03:32 +0000 (23:03 +0100)]
lavc/h264_levels: Avoid integer overflow in bitrate

Fixes CID #1439656.

5 years agoavformat/utils: set AV_PKT_FLAG_KEY for data packets
Baptiste Coudurier [Mon, 30 Jul 2018 18:10:38 +0000 (11:10 -0700)]
avformat/utils: set AV_PKT_FLAG_KEY for data packets

5 years agoavformat/ivfenc: fix writing codec tag
James Almer [Mon, 24 Sep 2018 00:54:24 +0000 (21:54 -0300)]
avformat/ivfenc: fix writing codec tag

The value in AVCodecParameters->codec_tag may not be correct for IVF,
as it's the case when remuxing AV1 streams from mp4, so ignore it and
write the correct value based on codec ID instead.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter/vf_threshold: add slice threading
Paul B Mahol [Mon, 24 Sep 2018 18:21:17 +0000 (20:21 +0200)]
avfilter/vf_threshold: add slice threading

5 years agoavfilter/sr: process and output message when load_model is NULL
Steven Liu [Mon, 24 Sep 2018 14:02:54 +0000 (22:02 +0800)]
avfilter/sr: process and output message when load_model is NULL

fix ticket: 7455

Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavcodec/ilbcdec: fix typo, fixes CID 1439653
Paul B Mahol [Mon, 24 Sep 2018 07:20:31 +0000 (09:20 +0200)]
avcodec/ilbcdec: fix typo, fixes CID 1439653

5 years agoavcodec/prosumer: Check remaining space in put byte context
Michael Niedermayer [Sat, 22 Sep 2018 16:14:07 +0000 (18:14 +0200)]
avcodec/prosumer: Check remaining space in put byte context

Fixes: Timeout
Fixes: 10053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5636993883570176
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>
5 years agoavcodec/prosumer: Remove unused table element
Michael Niedermayer [Sat, 22 Sep 2018 16:14:06 +0000 (18:14 +0200)]
avcodec/prosumer: Remove unused table element

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: remove unneeded variable from vertical_predict
Michael Niedermayer [Sat, 22 Sep 2018 16:14:05 +0000 (18:14 +0200)]
avcodec/prosumer: remove unneeded variable from vertical_predict

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: Rename do_shift() to vertical_predict()
Michael Niedermayer [Sat, 22 Sep 2018 16:14:04 +0000 (18:14 +0200)]
avcodec/prosumer: Rename do_shift() to vertical_predict()

It seems what this function does is a vertical prediction filter, thus
the new name should improve understanding.

rename the related table_b too

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: mark src as const
Michael Niedermayer [Sat, 22 Sep 2018 16:14:03 +0000 (18:14 +0200)]
avcodec/prosumer: mark src as const

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: Only scan as many elements as matter in fill_elements()
Michael Niedermayer [Sat, 22 Sep 2018 16:14:02 +0000 (18:14 +0200)]
avcodec/prosumer: Only scan as many elements as matter in fill_elements()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: factorize e0 setting out
Michael Niedermayer [Sat, 22 Sep 2018 16:14:01 +0000 (18:14 +0200)]
avcodec/prosumer: factorize e0 setting out

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: Use 16bit instead of 32 for table
Michael Niedermayer [Sat, 22 Sep 2018 16:14:00 +0000 (18:14 +0200)]
avcodec/prosumer: Use 16bit instead of 32 for table

Simplifies code and reduces needed memory

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: Factorize the 2 loops in fill_elements()
Michael Niedermayer [Sat, 22 Sep 2018 16:13:59 +0000 (18:13 +0200)]
avcodec/prosumer: Factorize the 2 loops in fill_elements()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: clean up loop end code in fill_elements()
Michael Niedermayer [Sat, 22 Sep 2018 16:13:58 +0000 (18:13 +0200)]
avcodec/prosumer: clean up loop end code in fill_elements()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/prosumer: Remove dead code
Michael Niedermayer [Sat, 22 Sep 2018 16:13:57 +0000 (18:13 +0200)]
avcodec/prosumer: Remove dead code

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter: document mono option of silencedetect filter
Paul B Mahol [Sun, 23 Sep 2018 21:10:51 +0000 (23:10 +0200)]
avfilter: document mono option of silencedetect filter

Also provide shorter option, and reorder options in documentation.

5 years agoavdevice/decklink: add support for selecting devices based on their unique ID
Marton Balint [Thu, 20 Sep 2018 21:56:00 +0000 (23:56 +0200)]
avdevice/decklink: add support for selecting devices based on their unique ID

Also bump the API version requirement to 10.9.5, because on olders versions
there were some reports of crashes using the undocumented, yet available
BMDDeckLinkDeviceHandle.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/vaapi: free slice_buffers when decoding failed
Linjie Fu [Wed, 19 Sep 2018 02:01:23 +0000 (10:01 +0800)]
avcodec/vaapi: free slice_buffers when decoding failed

If vaEndPicture() failed in ff_vaapi_decode_issue(), free
the pic->slice_buffers.

Fixes the memory leak issue in ticket #7385

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
5 years agodoc/encoders: Document -sei option to hevc_vaapi
Mark Thompson [Tue, 18 Sep 2018 22:31:06 +0000 (23:31 +0100)]
doc/encoders: Document -sei option to hevc_vaapi

5 years agovaapi_encode_h265: Set level based on stream if not set by user
Mark Thompson [Tue, 18 Sep 2018 22:31:05 +0000 (23:31 +0100)]
vaapi_encode_h265: Set level based on stream if not set by user

Sets the level based on the stream properties if it is not explicitly
set by the user.  Also add a tier option to set general_tier_flag, since
that affects the level choice.

5 years agolavc/h265: Add some common code for profile/tier/level handling
Mark Thompson [Tue, 18 Sep 2018 22:31:04 +0000 (23:31 +0100)]
lavc/h265: Add some common code for profile/tier/level handling

Adds support for determining for level limits, including mapping PTL
blocks to profiles to check profile-dependent level limits.

5 years agovaapi_encode_h265: Improve profile support
Mark Thompson [Tue, 18 Sep 2018 22:31:03 +0000 (23:31 +0100)]
vaapi_encode_h265: Improve profile support

Set profile compatibility/constraint flags properly (including the
constraint flags used for RExt profiles, as all streams we can currently
generate are RExt-compatible), and use that to add support for the "Main
Intra" and "Main 10 Intra" RExt subprofiles (for which we can re-use the
existing Main and Main10 VAAPI profiles).

5 years agocbs_h264: Infer default VUI values if VUI parameters are not present
Mark Thompson [Tue, 18 Sep 2018 22:31:02 +0000 (23:31 +0100)]
cbs_h264: Infer default VUI values if VUI parameters are not present

5 years agocbs_h264: Fix profile typo
Mark Thompson [Tue, 18 Sep 2018 22:31:01 +0000 (23:31 +0100)]
cbs_h264: Fix profile typo

5 years agocbs_h264: Fix default value for max mv lengths
Mark Thompson [Tue, 18 Sep 2018 22:31:00 +0000 (23:31 +0100)]
cbs_h264: Fix default value for max mv lengths

A recent version of the standard changed the max and default to 15, from
16 in older versions.  This updates the default to 15 to match, but the
max stays as 16 so that we don't reject older streams.

5 years agoh264_metadata: Add option to set the level of the stream
Mark Thompson [Tue, 18 Sep 2018 22:30:59 +0000 (23:30 +0100)]
h264_metadata: Add option to set the level of the stream

5 years agovaapi_encode_h264: Set level based on stream if not set by user
Mark Thompson [Tue, 18 Sep 2018 22:30:58 +0000 (23:30 +0100)]
vaapi_encode_h264: Set level based on stream if not set by user

5 years agolavc/h264: Add common code for level handling
Mark Thompson [Tue, 18 Sep 2018 22:30:57 +0000 (23:30 +0100)]
lavc/h264: Add common code for level handling

Including a unit test.

5 years agohwcontext_vaapi: Improve format mapping
Mark Thompson [Tue, 18 Sep 2018 22:30:56 +0000 (23:30 +0100)]
hwcontext_vaapi: Improve format mapping

Give the entries in the VAAPI format map table an explicit type and add
functions to do the necessary lookups.  Add another field to this table
indicating whether the chroma planes are swapped (as in YV12), and use
that rather than explicit comparisons where swapping is needed.

5 years agovaapi_encode_mjpeg: Mark as intra-only
Mark Thompson [Tue, 18 Sep 2018 22:30:55 +0000 (23:30 +0100)]
vaapi_encode_mjpeg: Mark as intra-only

5 years agovaapi_encode_mjpeg: Use CBS to store parameters and write headers
Mark Thompson [Tue, 18 Sep 2018 22:30:54 +0000 (23:30 +0100)]
vaapi_encode_mjpeg: Use CBS to store parameters and write headers

Also adds greyscale, 4:2:2, 4:4:4 and RGB support.

5 years agolavc/cbs: Add JPEG support
Mark Thompson [Tue, 18 Sep 2018 22:30:53 +0000 (23:30 +0100)]
lavc/cbs: Add JPEG support

5 years agohwcontext_vaapi: Improve logging around quirk detection
Mark Thompson [Tue, 18 Sep 2018 22:30:52 +0000 (23:30 +0100)]
hwcontext_vaapi: Improve logging around quirk detection

Clarify that the list is the naughty list, and therefore being on it is
not desirable.  The i965 driver does not need to be on the list after
version 2.0 (when the standard parameter buffer rendering behaviour was
changed).

5 years agodoc/encoders: Add missing options to VAAPI encoders
Mark Thompson [Tue, 18 Sep 2018 22:30:51 +0000 (23:30 +0100)]
doc/encoders: Add missing options to VAAPI encoders

5 years agovaapi_encode_h26[45]: Make the AUD option a boolean
Mark Thompson [Tue, 18 Sep 2018 22:30:50 +0000 (23:30 +0100)]
vaapi_encode_h26[45]: Make the AUD option a boolean

5 years agovaapi_encode_h264: Properly set constraint flags
Mark Thompson [Tue, 18 Sep 2018 22:30:49 +0000 (23:30 +0100)]
vaapi_encode_h264: Properly set constraint flags

constraint_set1_flag should be set for constrained baseline and main
profiles, because the stream conforms to main profile.

constraint_set3_flag should be set for high profile when the stream
is intra-only.

constraint_set4_flag should always be set for main and high profiles
because interlaced encoding is not supported.

constraint_set5_flag should be set for main and high profiles when
B-frames are not used.

Also fix the setting of max_num_ref_frames - use the gop_size value
to check for intra-only rather than the constraint flag (which is not
necessarily set).

5 years agovaapi_encode: Clean up the packed header configuration
Mark Thompson [Tue, 18 Sep 2018 22:30:48 +0000 (23:30 +0100)]
vaapi_encode: Clean up the packed header configuration

Add a larger warning more clearly explaining the consequences of missing
packed header support in the driver.  Also only write the extradata if the
user actually requests it via the GLOBAL_HEADER flag.

5 years agovaapi_encode: Clean up the GOP structure configuration
Mark Thompson [Tue, 18 Sep 2018 22:30:47 +0000 (23:30 +0100)]
vaapi_encode: Clean up the GOP structure configuration

Choose what types of reference frames will be used based on what types
are available, and make the intra-only mode explicit (GOP size one,
which must be used for MJPEG).

5 years agovaapi_encode: Add support for max QP in rate control
Mark Thompson [Tue, 18 Sep 2018 22:30:46 +0000 (23:30 +0100)]
vaapi_encode: Add support for max QP in rate control

This was added in libva 2.1.0 (VAAPI 1.1.0).  Use AVCodecContext.qmax,
matching the existing behaviour for qmin, and clean up the defaults so
that we only pass min/max when explicitly set.

5 years agovaapi_encode: Clean up rate control configuration
Mark Thompson [Tue, 18 Sep 2018 22:30:45 +0000 (23:30 +0100)]
vaapi_encode: Clean up rate control configuration

Query which modes are supported and select between VBR and CBR based
on that - this removes all of the codec-specific rate control mode
selection code.

5 years agovaapi_encode: Always reapply global parameters after the sequence header
Mark Thompson [Tue, 18 Sep 2018 22:30:44 +0000 (23:30 +0100)]
vaapi_encode: Always reapply global parameters after the sequence header

The codec sequence headers may contain fields which can overwrite the
fine parameters given in the specific settings (e.g. a crude bitrate
value vs. the max-rate / target-percentage / etc. values in
VAEncMiscParameterRateControl).  Always reapply all global parameters
after a sequence header to avoid this causing problems.

5 years agovaapi_encode: Clean up the encode quality configuration
Mark Thompson [Tue, 18 Sep 2018 22:30:43 +0000 (23:30 +0100)]
vaapi_encode: Clean up the encode quality configuration

5 years agovaapi_encode_mpeg2: Add options
Mark Thompson [Tue, 18 Sep 2018 22:30:42 +0000 (23:30 +0100)]
vaapi_encode_mpeg2: Add options

Include the common options, and also named options for setting the profile
and level.

5 years agovaapi_encode: Add common options between all encoders
Mark Thompson [Tue, 18 Sep 2018 22:30:41 +0000 (23:30 +0100)]
vaapi_encode: Add common options between all encoders

The only common option here is low_power - it was previously supported
for H.264 only, that specific option is removed.

5 years agovaapi_encode: Choose profiles dynamically
Mark Thompson [Tue, 18 Sep 2018 22:30:40 +0000 (23:30 +0100)]
vaapi_encode: Choose profiles dynamically

Previously there was one fixed choice for each codec (e.g. H.265 -> Main
profile), and using anything else then required an explicit option from
the user.  This changes to selecting the profile based on the input format
and the set of profiles actually supported by the driver (e.g. P010 input
will choose Main 10 profile for H.265 if the driver supports it).

The entrypoint and render target format are also chosen dynamically in the
same way, removing those explicit selections from the per-codec code.

5 years agoconfigure: Use pkgconfig for VAAPI
Mark Thompson [Tue, 18 Sep 2018 22:30:39 +0000 (23:30 +0100)]
configure: Use pkgconfig for VAAPI

Set the minimum version to 0.35.0 (libva 1.3.0) and remove redundant
configure tests.  This also allows the proprietary libmfx fork of libva,
which always shows the version number 0.99.0 (independent of the actual
version).

5 years agoavcodec: add native iLBC decoder
Paul B Mahol [Sat, 4 Feb 2017 20:11:48 +0000 (21:11 +0100)]
avcodec: add native iLBC decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agofate/mov : use do_md5sum for mov-faststart-4gb-overflow test
Martin Vignali [Thu, 20 Sep 2018 16:54:20 +0000 (18:54 +0200)]
fate/mov : use do_md5sum for mov-faststart-4gb-overflow test

fix test on osx

based on suggestion by Hendrik Leppkes

5 years agoavcodec/ac3dec: Fix shift signedness in mask creation
Michael Niedermayer [Fri, 21 Sep 2018 00:36:50 +0000 (02:36 +0200)]
avcodec/ac3dec: Fix shift signedness in mask creation

Fixes: 9924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5473421772193792
Fixes: left shift of 1 by 63 places cannot be represented in type 'long long'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/eac3dec: Check that channel_map does not contain more than EAC3_MAX_CHANNELS
Michael Niedermayer [Wed, 27 Jun 2018 12:43:39 +0000 (14:43 +0200)]
avcodec/eac3dec: Check that channel_map does not contain more than EAC3_MAX_CHANNELS

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoRevert "avformat/matroskaenc: write CodecPrivate in WebM"
James Almer [Fri, 21 Sep 2018 21:22:05 +0000 (18:22 -0300)]
Revert "avformat/matroskaenc: write CodecPrivate in WebM"

This reverts commit 4755b6e6d194b0a0fb72957cd3dc0eaf7b2375f7.

This change was not necessary. CodecPrivate was being written to WebM
for codecs like AV1 already.

5 years agoavformat/matroskaenc: write CodecPrivate in WebM
James Almer [Fri, 21 Sep 2018 19:55:35 +0000 (16:55 -0300)]
avformat/matroskaenc: write CodecPrivate in WebM

This is now needed for AV1.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavf/matroska: Allow AV1 in WebM
Kagami Hiiragi [Mon, 20 Aug 2018 16:44:40 +0000 (19:44 +0300)]
lavf/matroska: Allow AV1 in WebM

Nothing prevents it to work except this check. AV1 is already supported
by Matroska muxer and aomenc produces WebM/AV1 files as well.

Signed-off-by: Kagami Hiiragi <kagami@genshiken.org>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter/vf_sr: Fix coverity CID 1439584
Pedro Arthur [Thu, 20 Sep 2018 14:48:20 +0000 (11:48 -0300)]
avfilter/vf_sr: Fix coverity CID 1439584

5 years agolavc/avpacket: Add missing conversions from side data enum to name.
Jun Zhao [Mon, 17 Sep 2018 14:27:31 +0000 (22:27 +0800)]
lavc/avpacket: Add missing conversions from side data enum to name.

Add missing conversions from side data enum to name.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavu/frame: Add missing conversions from side data enum to name
Jun Zhao [Mon, 17 Sep 2018 14:22:01 +0000 (22:22 +0800)]
lavu/frame: Add missing conversions from side data enum to name

Add missing conversions from side data enum to name.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agodoc/examples/vaapi_transcode: Fix the typo
Michael Niedermayer [Wed, 19 Sep 2018 16:05:31 +0000 (18:05 +0200)]
doc/examples/vaapi_transcode: Fix the typo

Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/dashenc: Reduce Muxing overhead for chunked CMAF format
Karthick Jeyapal [Fri, 14 Sep 2018 10:17:20 +0000 (15:47 +0530)]
avformat/dashenc: Reduce Muxing overhead for chunked CMAF format

SIDX atom being inserted for every MOOF atom increases the muxing overhead.
This behaviour can be disabled for chunked CMAF format by enabling Global SIDX option of mov muxer.

5 years agoavcodec/dvdsubdec: Sanity check len in decode_rle()
Michael Niedermayer [Thu, 13 Sep 2018 01:33:50 +0000 (03:33 +0200)]
avcodec/dvdsubdec: Sanity check len in decode_rle()

Fixes: Timeout
Fixes: 9778/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5186007132536832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mpeg4videodec: Fix undefined shift in get_amv()
Michael Niedermayer [Fri, 14 Sep 2018 22:20:38 +0000 (00:20 +0200)]
avcodec/mpeg4videodec: Fix undefined shift in get_amv()

Fixes: runtime error: shift exponent -1 is negative
Fixes: 9938/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5653783529914368
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mpeg4videodec: Check rice_prefix_code
Michael Niedermayer [Fri, 14 Sep 2018 22:09:45 +0000 (00:09 +0200)]
avcodec/mpeg4videodec: Check rice_prefix_code

Fixes: out of array read
Fixes: 10064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5766801384800256
Fixes: 10225/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5071833448054784
Fixes: 10261/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5115048024866816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/pcx: Check for end of input in pcx_rle_decode() and propagate error
Michael Niedermayer [Sat, 15 Sep 2018 20:57:59 +0000 (22:57 +0200)]
avcodec/pcx: Check for end of input in pcx_rle_decode() and propagate error

Fixes: Timeout
Fixes: 10279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCX_fuzzer-5729311395414016
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/av1_parse: Fix bistream typo
Michael Niedermayer [Wed, 19 Sep 2018 16:05:24 +0000 (18:05 +0200)]
avcodec/av1_parse: Fix bistream typo

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec: [loongson] optimize get_cabac_inline.
Shiyou Yin [Tue, 18 Sep 2018 02:59:41 +0000 (10:59 +0800)]
avcodec: [loongson] optimize get_cabac_inline.

This optimization improved h264 decoding performance about 4%(from 74fps to 77fps, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/dnn_backend_native: fix memleak
Zhao Zhili [Wed, 19 Sep 2018 02:55:13 +0000 (10:55 +0800)]
avfilter/dnn_backend_native: fix memleak

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agoavfilter/dnn_backend_native: fix invalid free
Zhao Zhili [Wed, 19 Sep 2018 02:55:12 +0000 (10:55 +0800)]
avfilter/dnn_backend_native: fix invalid free

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>