ffmpeg.git
3 months agofate/proresenc_aw : add test for interlace and 444 encoding
Martin Vignali [Tue, 26 Feb 2019 10:58:00 +0000 (11:58 +0100)]
fate/proresenc_aw : add test for interlace and 444 encoding

3 months agoavcodec/proresenc_aw : fix sub_image_with_fill for interlaced encoding
Martin Vignali [Tue, 26 Feb 2019 10:54:23 +0000 (11:54 +0100)]
avcodec/proresenc_aw : fix sub_image_with_fill for interlaced encoding

used when width and/or height, not multiple of sclice dim

3 months agoavcodec/mips: [loongson] mmi optimizations for VP9 put and avg functions
gxw [Mon, 25 Feb 2019 10:13:51 +0000 (18:13 +0800)]
avcodec/mips: [loongson] mmi optimizations for VP9 put and avg functions

VP9 decoding speed improved about 60.5%(from 38fps to 61fps, tested on loongson 3A3000).

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agomov: Fix start_time for streams with empty edits in the middle
Justin Ruggles [Fri, 22 Feb 2019 22:21:00 +0000 (17:21 -0500)]
mov: Fix start_time for streams with empty edits in the middle

Empty edits can occur at any position within the edit list except for at
the end. Empty edits in the middle should not impact the reported stream
start_time or the video PTS adjustment, so only include empty edits at
the start of the list in empty_edits_sum_duration.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 months agohttp: Do not try to make a new request when seeking past the end of the file
Justin Ruggles [Wed, 20 Feb 2019 14:52:43 +0000 (09:52 -0500)]
http: Do not try to make a new request when seeking past the end of the file

This avoids making invalid HTTP Range requests for a byte range past the
known end of the file during a seek. Those requests generally return a HTTP
response of 416 Range Not Satisfiable, which causes an error response.

Reference: https://tools.ietf.org/html/rfc7233

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 months agovaapi_encode_mpeg2: Add missing marker bit in time_code
Mark Thompson [Sun, 10 Feb 2019 19:47:02 +0000 (19:47 +0000)]
vaapi_encode_mpeg2: Add missing marker bit in time_code

We don't have anything useful to put in this field, but there is still
meant to be a marker bit in the middle of it.

3 months agovaapi_encode_mjpeg: Use common quality option
Mark Thompson [Sun, 10 Feb 2019 19:47:01 +0000 (19:47 +0000)]
vaapi_encode_mjpeg: Use common quality option

Doesn't change anything, but makes the behaviour better match that of the
other codecs (the CONSTANT_QUALITY_ONLY flag already ensures that CQP is
the only RC mode selectable for MJPEG).

3 months agovaapi_encode_vp9: Fix whitespace after previous patch
Mark Thompson [Sun, 10 Feb 2019 19:47:00 +0000 (19:47 +0000)]
vaapi_encode_vp9: Fix whitespace after previous patch

3 months agovaapi_encode_vp9: Enable support for more RC modes
Mark Thompson [Sun, 10 Feb 2019 19:46:59 +0000 (19:46 +0000)]
vaapi_encode_vp9: Enable support for more RC modes

3 months agovaapi_encode_vp8: Enable support for more RC modes
Mark Thompson [Sun, 10 Feb 2019 19:46:58 +0000 (19:46 +0000)]
vaapi_encode_vp8: Enable support for more RC modes

3 months agovaapi_encode_mpeg2: Enable support for more RC modes
Mark Thompson [Sun, 10 Feb 2019 19:46:57 +0000 (19:46 +0000)]
vaapi_encode_mpeg2: Enable support for more RC modes

Fixes #7650.

3 months agovaapi_encode_h265: Enable support for more RC modes
Mark Thompson [Sun, 10 Feb 2019 19:46:56 +0000 (19:46 +0000)]
vaapi_encode_h265: Enable support for more RC modes

Also fixes QP going out of range when modified by the quant factor/offset
values, and clarifies the QP behaviour for >8-bit modes.

3 months agovaapi_encode_h264: Enable support for more RC modes
Mark Thompson [Sun, 10 Feb 2019 19:46:55 +0000 (19:46 +0000)]
vaapi_encode_h264: Enable support for more RC modes

Also fixes QP going out of range when modified by the quant factor/offset
values.

3 months agovaapi_encode: Support more RC modes
Mark Thompson [Sun, 10 Feb 2019 19:46:54 +0000 (19:46 +0000)]
vaapi_encode: Support more RC modes

Allow setting the mode explicitly, and try to make a sensible choice
given the available parameters if not.

3 months agovaapi_encode: Do not zero access unit structures
Mark Thompson [Mon, 25 Feb 2019 23:24:23 +0000 (23:24 +0000)]
vaapi_encode: Do not zero access unit structures

Following b8c45bbcbc207293f955e838ea66106f4b65b1ac they contain allocated
unit arrays which will get leaked.  These operations were inconsistently
applied and never actually needed (the old uninit left them in the correct
state), so just drop them entirely.

3 months agolibavcodec/cbs: Stop needlessly reallocating the units array
Andreas Rheinhardt [Mon, 11 Feb 2019 22:47:43 +0000 (23:47 +0100)]
libavcodec/cbs: Stop needlessly reallocating the units array

Currently, a fragment's unit array is constantly reallocated during
splitting of a packet. This commit changes this: One can keep the units
array by distinguishing between the number of allocated and the number
of valid units in the units array.

The more units a packet is split into, the bigger the benefit.
So MPEG-2 benefits the most; for a video coming from an NTSC-DVD
(usually 32 units per frame) the average cost of cbs_insert_unit (for a
single unit) went down from 6717 decicycles to 450 decicycles (based
upon 10 runs with 4194304 runs each); if each packet consists of only
one unit, it went down from 2425 to 448; for a H.264 video where most
packets contain nine units, it went from 4431 to 450.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
3 months agofilter_units, trace_headers: Always use fragment from context
Andreas Rheinhardt [Mon, 11 Feb 2019 22:47:42 +0000 (23:47 +0100)]
filter_units, trace_headers: Always use fragment from context

This is in preparation for another patch that will stop needless
reallocations of the unit array.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
3 months agoavcodec/wcmv: Avoid copying frames if they are unchanged
Michael Niedermayer [Tue, 19 Feb 2019 18:05:10 +0000 (19:05 +0100)]
avcodec/wcmv: Avoid copying frames if they are unchanged

Improves speed of the testcase by about a factor of 10

Fixes: Timeout
Fixes: 13132/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664190616829952

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/wcmv: Copy/Init frame later
Michael Niedermayer [Tue, 19 Feb 2019 18:02:07 +0000 (19:02 +0100)]
avcodec/wcmv: Copy/Init frame later

Speeds up error cases
Fixes: 13132/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664190616829952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/error_resilience: Use a symmetric check for skipping MV estimation
Michael Niedermayer [Tue, 19 Feb 2019 17:41:42 +0000 (18:41 +0100)]
avcodec/error_resilience: Use a symmetric check for skipping MV estimation

This speeds up the testcase by a factor of 4

Fixes: Timeout
Fixes: 13100/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5767533905313792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/mjpegdec: Fix stereo3d memleak
Michael Niedermayer [Sun, 17 Feb 2019 19:43:28 +0000 (20:43 +0100)]
avcodec/mjpegdec: Fix stereo3d memleak

Fixes: 12937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5714945346371584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/arbc: Check nb_tiles against dimensions
Michael Niedermayer [Sun, 17 Feb 2019 21:40:34 +0000 (22:40 +0100)]
avcodec/arbc: Check nb_tiles against dimensions

Fixes: Timeout
Fixes: 12967/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5639021454163968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agodoc: -report defaults to loglevel debug
Gyan Doshi [Mon, 25 Feb 2019 16:11:14 +0000 (21:41 +0530)]
doc: -report defaults to loglevel debug

3 months agoavformat/dashenc: Added comments
Karthick J [Tue, 19 Feb 2019 06:45:29 +0000 (12:15 +0530)]
avformat/dashenc: Added comments

Added comments regarding usage of certain movflags in streaming mode.

3 months agoavformat/dashenc: Added option to repeatedly publish master playlist
Karthick J [Tue, 19 Feb 2019 06:31:32 +0000 (12:01 +0530)]
avformat/dashenc: Added option to repeatedly publish master playlist

The master playlist can be published at a specified interval with this option

3 months agoavformat:matroskadec: use a define to mark the EBML length is unknown
Steve Lhomme [Sat, 23 Feb 2019 10:14:33 +0000 (11:14 +0100)]
avformat:matroskadec: use a define to mark the EBML length is unknown

Unifying the way the EBML unknown length is signaled, rather than using two
incompatible values. UINT64_MAX cannot be read as a valid EBML length with the
current code.

Co-authored-by: Steve Lhomme <robux4@ycbcr.xyz>
Co-authored-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavutil/cuda_check: Fix non-dynamic-loader implementation
Philip Langdale [Wed, 20 Feb 2019 03:12:19 +0000 (19:12 -0800)]
avutil/cuda_check: Fix non-dynamic-loader implementation

The function typedefs we were using are only present when using the
dynamic loader, which means compilation breaks for code directly
using the cuda SDK.

To fix this, let's just duplicate the function typedefs locally.
These are not going to change.

3 months agoavcodec/mlpdec: Insuffient typo
Michael Niedermayer [Sat, 23 Feb 2019 21:00:39 +0000 (22:00 +0100)]
avcodec/mlpdec: Insuffient typo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/pnm: Avoid structure pointer dereferences in inner loop in pnm_get()
Michael Niedermayer [Thu, 21 Feb 2019 17:38:40 +0000 (18:38 +0100)]
avcodec/pnm: Avoid structure pointer dereferences in inner loop in pnm_get()

Improves speed from 5.4 to 4.2 seconds
Fixes: 13149/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-5760833622114304
Fixes: 13166/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5763216322330624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/zmbv: obtain frame later
Michael Niedermayer [Thu, 21 Feb 2019 16:25:14 +0000 (17:25 +0100)]
avcodec/zmbv: obtain frame later

The frame is not needed that early so obtaining it later avoids
the costly operation in case other checks fail.

Fixes: Timeout (14sec -> 4sec)
Fixes: 13140/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5738330308739072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/jvdec: Check available input space before decode8x8()
Michael Niedermayer [Thu, 21 Feb 2019 00:09:43 +0000 (01:09 +0100)]
avcodec/jvdec: Check available input space before decode8x8()

Fixes: Timeout (78 sec -> 15 millisec)
Fixes: 13147/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JV_fuzzer-5727107827630080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agortpenc_chain: forward strict_std_compliance flags to rtp muxer
Tristan Matthews [Fri, 22 Feb 2019 20:40:27 +0000 (15:40 -0500)]
rtpenc_chain: forward strict_std_compliance flags to rtp muxer

fixes: https://trac.ffmpeg.org/ticket/6713
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/proresenc_aw : indent after prev commit
Martin Vignali [Sat, 9 Feb 2019 17:45:04 +0000 (18:45 +0100)]
avcodec/proresenc_aw : indent after prev commit

3 months agoavcodec/proresenc_aw : add interlace encoding
Martin Vignali [Sat, 9 Feb 2019 17:42:44 +0000 (18:42 +0100)]
avcodec/proresenc_aw : add interlace encoding

3 months agoavcodec/proresenc_aw : merge funcs subimage_with_fill and subimage_alpha_with_fill
Martin Vignali [Sat, 9 Feb 2019 17:25:31 +0000 (18:25 +0100)]
avcodec/proresenc_aw : merge funcs subimage_with_fill and subimage_alpha_with_fill

3 months agoavcodec/proresenc_aw : move scantable to prores context
Martin Vignali [Sat, 9 Feb 2019 17:20:21 +0000 (18:20 +0100)]
avcodec/proresenc_aw : move scantable to prores context

3 months agoavcodec/proresenc_aw : move picture encoding after frame header write
Martin Vignali [Sat, 9 Feb 2019 17:16:50 +0000 (18:16 +0100)]
avcodec/proresenc_aw : move picture encoding after frame header write

3 months agoavcodec/proresenc_aw : simplify frame flags
Martin Vignali [Sat, 9 Feb 2019 17:15:59 +0000 (18:15 +0100)]
avcodec/proresenc_aw : simplify frame flags

3 months agoavfilter/vf_amplify: add tolerance option
Paul B Mahol [Fri, 22 Feb 2019 22:32:27 +0000 (23:32 +0100)]
avfilter/vf_amplify: add tolerance option

3 months agoMAINTAINERS: remove myself as a docs & trac maintainer
Lou Logan [Fri, 22 Feb 2019 19:49:31 +0000 (10:49 -0900)]
MAINTAINERS: remove myself as a docs & trac maintainer

It is no longer interesting.

Signed-off-by: Lou Logan <lou@lrcd.com>
3 months agodoc/formats: add reference to ffmpeg(1) stream specifiers as that docs is more complete
Marton Balint [Sat, 16 Feb 2019 18:08:53 +0000 (19:08 +0100)]
doc/formats: add reference to ffmpeg(1) stream specifiers as that docs is more complete

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/mpegtsenc: add support for service and provider names with utf8 encoding
Marton Balint [Sun, 10 Feb 2019 21:08:45 +0000 (22:08 +0100)]
avformat/mpegtsenc: add support for service and provider names with utf8 encoding

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoffmpeg_filter: initialize sub2video.end_pts together with last_pts
Jan Ekström [Wed, 20 Feb 2019 18:54:11 +0000 (20:54 +0200)]
ffmpeg_filter: initialize sub2video.end_pts together with last_pts

This way re-initializations properly update end_pts, enabling
sub2video_heartbeat to call sub2video_update as expected to re-init
the sub2video AVFrame's contents and to feed a frame into the filter
chain.

This then fixes memory usage ballooning due to framesync waiting
for secondary input in case of no actual subtitle samples being present
for a while in source after a re-init occurs.

3 months agolavc/aarch64/h264dsp_init: Only use neon horizontal intra loopfilter for 4:2:0.
Carl Eugen Hoyos [Wed, 20 Feb 2019 22:56:21 +0000 (23:56 +0100)]
lavc/aarch64/h264dsp_init: Only use neon horizontal intra loopfilter for 4:2:0.

3 months agoppc/h264dsp: change loop filter stride argument to ptrdiff_t
James Almer [Wed, 20 Feb 2019 22:40:09 +0000 (19:40 -0300)]
ppc/h264dsp: change loop filter stride argument to ptrdiff_t

This was missed in d5d699ab6e6f8a8290748d107416fd5c19757a1b

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoarm/h264dsp: change loop filter stride argument to ptrdiff_t
James Almer [Wed, 20 Feb 2019 22:38:55 +0000 (19:38 -0300)]
arm/h264dsp: change loop filter stride argument to ptrdiff_t

This was missed in d5d699ab6e6f8a8290748d107416fd5c19757a1b

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoaarch64/h264dsp: change loop filter stride argument to ptrdiff_t
James Almer [Wed, 20 Feb 2019 22:38:46 +0000 (19:38 -0300)]
aarch64/h264dsp: change loop filter stride argument to ptrdiff_t

This was missed in d5d699ab6e6f8a8290748d107416fd5c19757a1b

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/h264_direct: Fix overflow in POC comparission
Michael Niedermayer [Wed, 13 Feb 2019 23:05:34 +0000 (00:05 +0100)]
avcodec/h264_direct: Fix overflow in POC comparission

Fixes: runtime error: signed integer overflow: 2147421862 - -33624063 cannot be represented in type 'int'
Fixes: 12885/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5733516975800320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agodoc/mailing-list-faq: add Mail Delivery info
Lou Logan [Wed, 20 Feb 2019 20:50:17 +0000 (11:50 -0900)]
doc/mailing-list-faq: add Mail Delivery info

Can be used as a vacation mode to enable/disable mail delivery
without needing to unsubscribe.

Signed-off-by: Lou Logan <lou@lrcd.com>
3 months agoMAINTAINERS: add myself for tonemap_opencl
Ruiling Song [Wed, 13 Feb 2019 01:29:10 +0000 (09:29 +0800)]
MAINTAINERS: add myself for tonemap_opencl

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolavf/jacosubdec: compute subtitle duration correctly
Adam Sampson [Tue, 19 Feb 2019 09:20:31 +0000 (09:20 +0000)]
lavf/jacosubdec: compute subtitle duration correctly

When a JACOsub subtitle has two timestamps, they represent its start and
end times (http://unicorn.us.com/jacosub/jscripts.html#l_times); the
duration is the difference between the two, not the sum of the two.

The subtitle end times in the FATE test for this were wrong as a result;
fix them too. (This test is based on JACOsub's demo.txt, and the end
time computed for the last line using @ now matches what the comments
there say it should be.)

Also tested in practice using MPV, a LaserDisc, and some authentic 1993
JACOsub files.

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoMerge commit '90b15f60bf4919deaed66d868e18107eba371da7'
James Almer [Wed, 20 Feb 2019 18:50:06 +0000 (15:50 -0300)]
Merge commit '90b15f60bf4919deaed66d868e18107eba371da7'

* commit '90b15f60bf4919deaed66d868e18107eba371da7':
  srt: Set srto_sender flag to sender srt socket

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '156ea66c91b1986a87916f187216978d686725f6'
James Almer [Wed, 20 Feb 2019 18:47:24 +0000 (15:47 -0300)]
Merge commit '156ea66c91b1986a87916f187216978d686725f6'

* commit '156ea66c91b1986a87916f187216978d686725f6':
  h264/x86: sign extend int stride in deblock functions

This commit is a noop, see d5d699ab6e6f8a8290748d107416fd5c19757a1b

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit 'eec93e57096aa4804862d62760442380c70d489b'
James Almer [Wed, 20 Feb 2019 18:43:30 +0000 (15:43 -0300)]
Merge commit 'eec93e57096aa4804862d62760442380c70d489b'

* commit 'eec93e57096aa4804862d62760442380c70d489b':
  libopenh264dec: Use a newer decoding entry point function

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '28a8b5413b64b831dfb8650208bccd8b78360484'
James Almer [Wed, 20 Feb 2019 18:42:01 +0000 (15:42 -0300)]
Merge commit '28a8b5413b64b831dfb8650208bccd8b78360484'

* commit '28a8b5413b64b831dfb8650208bccd8b78360484':
  h264/aarch64: add intra loop filter neon asm

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '846c3d6aca5484904e60946c4fe8b8833bc07f92'
James Almer [Wed, 20 Feb 2019 18:41:03 +0000 (15:41 -0300)]
Merge commit '846c3d6aca5484904e60946c4fe8b8833bc07f92'

* commit '846c3d6aca5484904e60946c4fe8b8833bc07f92':
  h264/aarch64: optimize neon loop filter

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit 'd7f4f5c4a18a0c9e62635cfa6fe8a9302b413c01'
James Almer [Wed, 20 Feb 2019 18:28:25 +0000 (15:28 -0300)]
Merge commit 'd7f4f5c4a18a0c9e62635cfa6fe8a9302b413c01'

* commit 'd7f4f5c4a18a0c9e62635cfa6fe8a9302b413c01':
  checkasm/h264: add loop filter tests

Merged-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/h264dsp: change loop filter stride argument to ptrdiff_t
James Almer [Wed, 20 Feb 2019 18:23:15 +0000 (15:23 -0300)]
avcodec/h264dsp: change loop filter stride argument to ptrdiff_t

3 months agoMerge commit 'bb515e3a735f526ccb1068031e289eb5aeb69e22'
James Almer [Wed, 20 Feb 2019 17:50:37 +0000 (14:50 -0300)]
Merge commit 'bb515e3a735f526ccb1068031e289eb5aeb69e22'

* commit 'bb515e3a735f526ccb1068031e289eb5aeb69e22':
  h264/aarch64: sign extend int stride in loop filter asm

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '41cf3e3b1ca375962951fde1b90a03b16197d205'
James Almer [Wed, 20 Feb 2019 17:48:58 +0000 (14:48 -0300)]
Merge commit '41cf3e3b1ca375962951fde1b90a03b16197d205'

* commit '41cf3e3b1ca375962951fde1b90a03b16197d205':
  arm: Create proper .rdata sections for COFF

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit 'ca44fa5d7fda7e954f3ebfeb5b0d6d1be55fcaa3'
James Almer [Wed, 20 Feb 2019 17:47:43 +0000 (14:47 -0300)]
Merge commit 'ca44fa5d7fda7e954f3ebfeb5b0d6d1be55fcaa3'

* commit 'ca44fa5d7fda7e954f3ebfeb5b0d6d1be55fcaa3':
  avcodec/libdav1d: properly free all output picture references

This commit is a noop, see 10931a0661eea87e3a7142e15b5077e617be55e9

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '90adbf4abf336f8042aecdf1e18fdf76a96304b1'
James Almer [Wed, 20 Feb 2019 17:47:13 +0000 (14:47 -0300)]
Merge commit '90adbf4abf336f8042aecdf1e18fdf76a96304b1'

* commit '90adbf4abf336f8042aecdf1e18fdf76a96304b1':
  cook: Use the correct table for 6-bit stereo coupling

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '70ab2778be9c83dab84340af7e3ba83fa0f98576'
James Almer [Wed, 20 Feb 2019 17:02:04 +0000 (14:02 -0300)]
Merge commit '70ab2778be9c83dab84340af7e3ba83fa0f98576'

* commit '70ab2778be9c83dab84340af7e3ba83fa0f98576':
  libdav1d: update API usage to the first stable release
  libdav1d: fix build after a recent API break
  qsvenc: Add VDENC support for H264 and HEVC
  avcodec: libdav1d AV1 decoder wrapper.
  swscale: Add GRAY10
  pixfmt: Add GRAY10
  libx264: Pass the reordered_opaque field through the encoder
  libavutil: Undeprecate the AVFrame reordered_opaque field
  libaom: remove references to yuva444p pixfmt
  Revert "decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext"

This commit is a noop, see
87588caf8cff318cd022ad5002304198c6ddbd51
4e9cff2824769e792c7867b09e1efb67278abe79
882ae091d48b112004b977314884176841f12cef
3f1b5ca22ec372bc6d4a45694e3070b8f5d05ad3
b5177c7051d1bece9e26d78c9978599334e90836
beaa350e24167f4ff31275a6114693f5ce7cd409
e92ce340e63058de32aec733b59fe2b196bed214

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '1ff6cb2ca6652e7d2a929afd33d8ed6268c45568'
James Almer [Wed, 20 Feb 2019 16:54:51 +0000 (13:54 -0300)]
Merge commit '1ff6cb2ca6652e7d2a929afd33d8ed6268c45568'

* commit '1ff6cb2ca6652e7d2a929afd33d8ed6268c45568':
  lavc/qsvenc_jpeg: set a default quality
  lavc/qsvenc_jpeg: add async_depth support

This commit is a noop, see
0e3d7d845d9b4596c0dac1f6e99c493af07308ae
92c25963e8b68c47055b813334eaf76599936a90

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '5584abf69d83169a010aca404cd1cf95c23ad9ef'
James Almer [Wed, 20 Feb 2019 16:51:30 +0000 (13:51 -0300)]
Merge commit '5584abf69d83169a010aca404cd1cf95c23ad9ef'

* commit '5584abf69d83169a010aca404cd1cf95c23ad9ef':
  arm: Emit .thumb_func directives

Merged-by: James Almer <jamrial@gmail.com>
3 months agodoc/libav-merge: add a line about the previous skipped merge
James Almer [Wed, 20 Feb 2019 16:51:19 +0000 (13:51 -0300)]
doc/libav-merge: add a line about the previous skipped merge

3 months agoMerge commit '04e8b8b0530e2aa33010faba3d0b6b6c9c5b704e'
James Almer [Wed, 20 Feb 2019 16:48:42 +0000 (13:48 -0300)]
Merge commit '04e8b8b0530e2aa33010faba3d0b6b6c9c5b704e'

* commit '04e8b8b0530e2aa33010faba3d0b6b6c9c5b704e':
  avcodec/libaomenc: export the Sequence Header OBU as extradata

This commit is a noop. aom_codec_get_global_headers() is buggy at the moment.
See https://bugs.chromium.org/p/aomedia/issues/detail?id=2208

Merged-by: James Almer <jamrial@gmail.com>
3 months agoMerge commit '97c9a5084479eeb66f4beb100cc7589a2c8bfe81'
James Almer [Wed, 20 Feb 2019 16:48:09 +0000 (13:48 -0300)]
Merge commit '97c9a5084479eeb66f4beb100cc7589a2c8bfe81'

* commit '97c9a5084479eeb66f4beb100cc7589a2c8bfe81':
  avcodec/libaomenc: remove AVOption related to frame partitions
  avcodec/extract_extradata: don't uninitialize the H2645Packet on every processed packet
  avcodec/extract_extradata: Move the reference in the bsf internal buffer
  avcodec/extract_extradata: Do not allocate more space than needed when removing NALUs in h264/hevc
  avcodec/extract_extradata: Zero-initialize the padding bytes in all allocated buffers
  avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing
  avcodec/bsf: Add ff_bsf_get_packet_ref() function

This commit is a noop, see

7ae52f8a6b4a137f79b032b7094b3d5867839d52
5a412a5c3cc216ae1d15e6b884bda7214b73a5b0
d168e78effd170377ec57f67bca05c9f0de91bca
2536bd863246218631ab27144d8a3be45036445a
9c6dd9d6248897a2d8dd4ede948c166e5a579a4b
016d40011ac2815157fc11f6dda2f9bfb520ecfe
b69ea742ab23ad74b2ae2772764743642212a139

Merged-by: James Almer <jamrial@gmail.com>
3 months agoaarch64: vp8: Move the vp8dsp makefile entries to the right places
Martin Storsjö [Thu, 31 Jan 2019 21:03:55 +0000 (23:03 +0200)]
aarch64: vp8: Move the vp8dsp makefile entries to the right places

Even if NEON would be disabled, the init functions should be built
as they are called as long as ARCH_AARCH64 is set.

These functions are part of a generic DSP subsytem, not tied directly
to one decoder. (They should be built if the vp7 decoder is enabled,
even if the vp8 decoder is disabled.)

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit b4b27dce95a6d40bfcd78043d3abec7d80dae143)

3 months agoaarch64: vp8: Remove superfluous includes
Martin Storsjö [Thu, 31 Jan 2019 21:03:38 +0000 (23:03 +0200)]
aarch64: vp8: Remove superfluous includes

This fixes building with MSVC, which lacks unistd.h.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit ad32f7b1264dbc614f0db1c443d5361420e9e07e)

3 months agoaarch64: vp8: Fix assembling with armasm64
Martin Storsjö [Thu, 31 Jan 2019 21:49:31 +0000 (23:49 +0200)]
aarch64: vp8: Fix assembling with armasm64

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2eeac79936e83c4495cbe5905064ab797e9b45ff)

3 months agoaarch64: vp8: Fix assembling with clang
Martin Storsjö [Thu, 31 Jan 2019 21:43:45 +0000 (23:43 +0200)]
aarch64: vp8: Fix assembling with clang

This also partially fixes assembling with MS armasm64 (via
gas-preprocessor).

The movrel macro invocations need to pass the offset via a separate
parameter. Mach-o and COFF relocations don't allow a negative
offset to a symbol, which is handled properly if the offset is passed
via the parameter. If no offset parameter is given, the macro
evaluates to something like "adrp x17, subpel_filters-16+(0)", which
older clang versions also fail to parse (the older clang versions
only support one single offset term, although it can be a parenthesis.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 26d7af4c381ee3c7b13b032b3817168b84b98ca6)

3 months agopalettegen: Fill with last color, not black
Tomas Härdin [Wed, 16 Jan 2019 12:07:48 +0000 (13:07 +0100)]
palettegen: Fill with last color, not black

If we fill with black then the generated palette will have one color more
than what the user requested. This also resulted in unwanted black specks in
the output of paletteuse, especially when generating small palettes.

3 months agolibavcodec/zmbvenc: motion estimation improvements/bug fixes:
Matthew Fearnley [Thu, 7 Feb 2019 12:54:59 +0000 (12:54 +0000)]
libavcodec/zmbvenc: motion estimation improvements/bug fixes:

- Clamp ME range to -64..63 (prevents corruption when me_range is too high)
- Allow MV's up to *and including* the positive range limit
- Allow out-of-edge ME by padding the prev buffer with a border of 0's
- Try previous MV before checking the rest (improves speed in some cases)
- More robust logic in code - ensure *mx,*my,*xored are updated together

3 months agolibavcodec/zmbvenc: block scoring improvements/bug fixes
Matthew Fearnley [Sat, 9 Feb 2019 13:10:20 +0000 (13:10 +0000)]
libavcodec/zmbvenc: block scoring improvements/bug fixes

- Improve block choices by counting 0-bytes in the entropy score
- Make histogram use uint16_t type, to allow byte counts from 16*16
(current block size) up to 255*255 (maximum allowed 8bpp block size)
- Make sure score table is big enough for a full block's worth of bytes
- Calculate *xored without using code in inner loop

3 months agolavc/libdavs2: fix parameter setting error
hwren [Thu, 24 Jan 2019 15:16:18 +0000 (23:16 +0800)]
lavc/libdavs2: fix parameter setting error

Signed-off-by: hwrenx <hwrenx@126.com>
3 months agolavc/libxavs2: use upper layer qp parameters first
hwren [Thu, 24 Jan 2019 15:16:17 +0000 (23:16 +0800)]
lavc/libxavs2: use upper layer qp parameters first

Signed-off-by: hwrenx <hwrenx@126.com>
3 months agolavc/libxavs2: remove unused context parameter
hwren [Thu, 24 Jan 2019 15:16:16 +0000 (23:16 +0800)]
lavc/libxavs2: remove unused context parameter

Signed-off-by: hwrenx <hwrenx@126.com>
3 months agolavf/mpeg: fix indent
Xiaofeng Wang [Mon, 18 Feb 2019 01:16:58 +0000 (09:16 +0800)]
lavf/mpeg: fix indent

Signed-off-by: Xiaofeng Wang <xiaofeng.wang@bqvision.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/matroskadec: Check parents remaining length
Steve Lhomme [Wed, 13 Feb 2019 12:20:45 +0000 (13:20 +0100)]
avformat/matroskadec: Check parents remaining length

This was found through the Hacker One program on VLC but is not a security issue in libavformat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/webmdashenc: Check id in adaption_sets
Michael Niedermayer [Wed, 13 Feb 2019 09:15:04 +0000 (10:15 +0100)]
avformat/webmdashenc: Check id in adaption_sets

Fixes: out of array access

Found-by: Wenxiang Qian
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/http: Fix Out-of-Bounds access in process_line()
Wenxiang Qian [Wed, 13 Feb 2019 07:54:08 +0000 (08:54 +0100)]
avformat/http: Fix Out-of-Bounds access in process_line()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/ftp: Fix Out-of-Bounds Access and Information Leak in ftp.c:393
Wenxiang Qian [Wed, 13 Feb 2019 07:47:20 +0000 (08:47 +0100)]
avformat/ftp: Fix Out-of-Bounds Access and Information Leak in ftp.c:393

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner loop...
Kevin Backhouse via RT [Wed, 6 Feb 2019 12:56:01 +0000 (12:56 +0000)]
avcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner loop for handling braces

Fixes: [Semmle Security Reports #19439]
Fixes: dos_sscanf2.mkv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner loop...
Kevin Backhouse via RT [Wed, 6 Feb 2019 11:29:22 +0000 (11:29 +0000)]
avcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner loop for tag scaning

Fixes: [Semmle Security Reports #19438]
Fixes: dos_sscanf1.mkv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/mpegvideo_enc: Use av_assert1() instead of assert()
Michael Niedermayer [Fri, 1 Feb 2019 21:53:53 +0000 (22:53 +0100)]
avcodec/mpegvideo_enc: Use av_assert1() instead of assert()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/matroskadec: Do not leak queued packets on sync errors
Michael Niedermayer [Wed, 6 Feb 2019 14:29:38 +0000 (15:29 +0100)]
avformat/matroskadec: Do not leak queued packets on sync errors

Fixes: memleak
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280

Reported-by: Chris Cunningham <chcunningham@google.com>
Tested-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agodoc/fftools-common-opts: add example for codec option stream specifiers
Gyan Doshi [Sun, 17 Feb 2019 05:58:31 +0000 (11:28 +0530)]
doc/fftools-common-opts: add example for codec option stream specifiers

3 months agodoc/muxers: grammar fix
Reto Kromer [Wed, 13 Feb 2019 16:03:07 +0000 (17:03 +0100)]
doc/muxers: grammar fix

Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
3 months agolavc/libgsmenc: Force mono and use 13k as default bitrate.
Carl Eugen Hoyos [Sat, 16 Feb 2019 19:18:07 +0000 (20:18 +0100)]
lavc/libgsmenc: Force mono and use 13k as default bitrate.

3 months agoavcodec/mips: [loongson] optimize theora decoding with mmi.
gxw [Tue, 12 Feb 2019 10:55:48 +0000 (18:55 +0800)]
avcodec/mips: [loongson] optimize theora decoding with mmi.

Optimize theora decoding with mmi in functions:
1. ff_vp3_idct_add_mmi
2. ff_vp3_idct_put_mmi
3. ff_vp3_idct_dc_add_mmi
4. ff_put_no_rnd_pixels_l2_mmi

Theora decoding speed improved about 32%(from 88fps to 116fps, Tested on loongson 3A3000).

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/mpeg4videodec: Clear interlaced_dct for studio profile
Michael Niedermayer [Fri, 15 Feb 2019 00:57:09 +0000 (01:57 +0100)]
avcodec/mpeg4videodec: Clear interlaced_dct for studio profile

Fixes: Out of array access
Fixes: 13090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5408668986638336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/version: Bump micro-version for nvdec/cuviddec changes
Philip Langdale [Sat, 16 Feb 2019 18:40:32 +0000 (10:40 -0800)]
avcodec/version: Bump micro-version for nvdec/cuviddec changes

I forgot to add the version bump and changelog within the changes.

3 months agoavcodec/cuviddec: Add support for decoding HEVC 4:4:4 content
Philip Langdale [Sun, 7 Oct 2018 16:10:00 +0000 (09:10 -0700)]
avcodec/cuviddec: Add support for decoding HEVC 4:4:4 content

This is the equivalent change for cuviddec after the previous change
for nvdec. I made similar changes to the copying routines to handle
pixel formats in a more generic way.

Note that unlike with nvdec, there is no confusion about the ability
of a codec to output 444 formats. This is because the cuvid parser is
used, meaning that 444 JPEG content is still indicated as using a 420
output format.

3 months agoavcodec/nvdec: Explicitly mark codecs that support 444 output formats
Philip Langdale [Sun, 7 Oct 2018 03:20:58 +0000 (20:20 -0700)]
avcodec/nvdec: Explicitly mark codecs that support 444 output formats

With the introduction of HEVC 444 support, we technically have two
codecs that can handle 444 - HEVC and MJPEG. In the case of MJPEG,
it can decode, but can only output one of the semi-planar formats.

That means we need additional logic to decide whether to use a
444 output format or not.

3 months agoavcodec/nvdec: Add support for decoding HEVC 4:4:4 content
Philip Langdale [Sun, 7 Oct 2018 01:11:52 +0000 (18:11 -0700)]
avcodec/nvdec: Add support for decoding HEVC 4:4:4 content

The latest generation video decoder on the Turing chips supports
decoding HEVC 4:4:4. Supporting this is relatively straight-forward;
we need to account for the different chroma format and pick the
right output and sw formats at the right times.

There was one bug which was the hard-coded assumption that the
first chroma plane would be half-height; I fixed this to use the
actual shift value on the plane.

We also need to pass the SPS and PPS range extension flags.

3 months agoavcodec/hevc_ps: Expose all SPS and PPS range extension flags
Philip Langdale [Wed, 13 Feb 2019 20:40:52 +0000 (12:40 -0800)]
avcodec/hevc_ps: Expose all SPS and PPS range extension flags

We need all the flags to be exposed to be able to pass them on to
HW decoders. I did not attempt to nuance any of the warnings about
flags being unsupported as there's no way, at the point we extract
flags, to say whether an HW decoder is being used.

4 months agoavutil/cuda_check: fix usage of removed .c file
Timo Rothenpieler [Thu, 14 Feb 2019 23:37:49 +0000 (00:37 +0100)]
avutil/cuda_check: fix usage of removed .c file

Why did this not break compilation?

4 months agoavformat/mov: Do not use reference stream in mov_read_sidx() if there is no reference...
Michael Niedermayer [Tue, 12 Feb 2019 22:28:35 +0000 (23:28 +0100)]
avformat/mov: Do not use reference stream in mov_read_sidx() if there is no reference stream

Fixes: NULL pointer dereference
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5634316373721088

Reported-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 months agoavcodec/nvenc: add b_as_ref support for HEVC
Roman Arzumanyan [Thu, 14 Feb 2019 12:20:25 +0000 (13:20 +0100)]
avcodec/nvenc: add b_as_ref support for HEVC

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>