ffmpeg.git
15 months agovaapi_encode_h264: Take VAAPIEncodeH264Context::sei_needed as an ORed value
Haihao Xiang [Thu, 3 May 2018 05:51:48 +0000 (13:51 +0800)]
vaapi_encode_h264: Take VAAPIEncodeH264Context::sei_needed as an ORed value

We may check priv->sei_needed only when writing SEI messages.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
15 months agoavfilter/drawutils: add support for full range
Paul B Mahol [Wed, 2 May 2018 11:10:10 +0000 (13:10 +0200)]
avfilter/drawutils: add support for full range

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/mpeg4videodec: Split decode_studio_vol_header() out of decode_studiovisualobj...
Michael Niedermayer [Sun, 29 Apr 2018 19:19:15 +0000 (21:19 +0200)]
avcodec/mpeg4videodec: Split decode_studio_vol_header() out of decode_studiovisualobject()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/mpeg4videodec: Move decode_studiovisualobject() parsing in the branch for...
Michael Niedermayer [Sun, 29 Apr 2018 19:19:14 +0000 (21:19 +0200)]
avcodec/mpeg4videodec: Move decode_studiovisualobject() parsing in the branch for visual object parsing

Fixes: runtime error: shift exponent -1 is negative
Fixes: 7510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5024523356209152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavformat/yuv4mpegdec: simplify math
Paul B Mahol [Tue, 1 May 2018 15:46:08 +0000 (17:46 +0200)]
avformat/yuv4mpegdec: simplify math

This one actually works with hd1080 y4m files when seeking backwards.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_neighbor: add >8 depth suppport
Paul B Mahol [Thu, 3 May 2018 10:48:47 +0000 (12:48 +0200)]
avfilter/vf_neighbor: add >8 depth suppport

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_convolution: unbreak roberts filter
Paul B Mahol [Thu, 3 May 2018 09:26:40 +0000 (11:26 +0200)]
avfilter/vf_convolution: unbreak roberts filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_convolution: add horizontal/row mode
Paul B Mahol [Thu, 3 May 2018 08:55:10 +0000 (10:55 +0200)]
avfilter/vf_convolution: add horizontal/row mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_overlay: exclude nv12/nv21 formats from x86 asm check
Paul B Mahol [Thu, 3 May 2018 07:22:28 +0000 (09:22 +0200)]
avfilter/vf_overlay: exclude nv12/nv21 formats from x86 asm check

They are yet to be supported,

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agolavf/dashenc: pass standards compliance value to the internal context
Jan Ekström [Fri, 27 Apr 2018 00:51:37 +0000 (03:51 +0300)]
lavf/dashenc: pass standards compliance value to the internal context

Enables one to test possibly nonstandard formats such as Opus or
FLAC in ISOBMFF, among other things.

This becomes much more useful if output segment format becomes an
option, or if the WebM segment feature gets removed.

15 months agolavf/dashenc: require experimental mode to be enabled for WebM
Jan Ekström [Fri, 27 Apr 2018 00:51:36 +0000 (03:51 +0300)]
lavf/dashenc: require experimental mode to be enabled for WebM

It has not ever been working and has not been validated,
Additionally, mention that the segment file names should be changed
to end with webm instead of m4s, which is utilized for ISOBMFF
fragments.

15 months agolavf/dashenc: don't call flush_init_segment before avformat_write_header
Rodger Combs [Fri, 27 Apr 2018 00:51:35 +0000 (03:51 +0300)]
lavf/dashenc: don't call flush_init_segment before avformat_write_header

Fixes crash when muxing MKV-in-DASH

15 months agoavfilter/vf_convolution: rewrite so it doesn't use temp buffers
Paul B Mahol [Wed, 2 May 2018 17:23:41 +0000 (19:23 +0200)]
avfilter/vf_convolution: rewrite so it doesn't use temp buffers

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_overlay: add x86 SIMD
Paul B Mahol [Mon, 30 Apr 2018 10:01:07 +0000 (12:01 +0200)]
avfilter/vf_overlay: add x86 SIMD

Specifically for yuv444, yuv422, yuv420 format when main stream has no alpha, and alpha
is straight.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agofftools/ffmpeg: properly initialize output stream field order
Tobias Rapp [Thu, 26 Apr 2018 12:23:02 +0000 (14:23 +0200)]
fftools/ffmpeg: properly initialize output stream field order

Fixes stream field order written by avformat_write_header when "top"
option is specified on the command-line.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
15 months agofate/cbs: Always overwrite output in cbs fate tests
Mark Thompson [Tue, 1 May 2018 23:46:04 +0000 (00:46 +0100)]
fate/cbs: Always overwrite output in cbs fate tests

Before this, a failed test would keep failing because the output file
is not cleaned up and subsequent runs would refuse to overwrite it.

15 months agolavc/cbs: Add tests for VP9
Mark Thompson [Sat, 7 Apr 2018 17:57:37 +0000 (18:57 +0100)]
lavc/cbs: Add tests for VP9

Uses the same mechanism as other codecs - conformance test files are
passed through the metadata filter (which, with no options, reads the
input and writes it back) and the output verified to match the input.

15 months agolavc: Add VP9 metadata bitstream filter
Mark Thompson [Mon, 2 Apr 2018 01:38:03 +0000 (02:38 +0100)]
lavc: Add VP9 metadata bitstream filter

Can adjust the colour information.

15 months agolavc: Add coded bitstream read/write support for VP9
Mark Thompson [Thu, 22 Jun 2017 21:42:51 +0000 (22:42 +0100)]
lavc: Add coded bitstream read/write support for VP9

15 months agocbs: Add support for array subscripts in trace output
Mark Thompson [Mon, 30 Apr 2018 21:35:30 +0000 (22:35 +0100)]
cbs: Add support for array subscripts in trace output

This makes the trace output for arrays significantly nicer.

15 months agocbs_h2645: Simplify representation of fixed values
Mark Thompson [Mon, 30 Apr 2018 21:35:24 +0000 (22:35 +0100)]
cbs_h2645: Simplify representation of fixed values

15 months agocbs: Fragment/unit data is always reference counted
Mark Thompson [Mon, 30 Apr 2018 23:18:16 +0000 (00:18 +0100)]
cbs: Fragment/unit data is always reference counted

Make this clear in the documentation and add some asserts to ensure
that it is always true.

15 months agoavfilter/af_biquads: add slice threading
Paul B Mahol [Tue, 1 May 2018 13:40:53 +0000 (15:40 +0200)]
avfilter/af_biquads: add slice threading

Helps with multi-channels audio. Otherwise use threads=1.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/af_biquads: change clipping detection from global to channel
Paul B Mahol [Tue, 1 May 2018 13:26:20 +0000 (15:26 +0200)]
avfilter/af_biquads: change clipping detection from global to channel

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_neighbor: add slice threading
Paul B Mahol [Tue, 1 May 2018 13:05:43 +0000 (15:05 +0200)]
avfilter/vf_neighbor: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_neighbor: simplify code little
Paul B Mahol [Tue, 1 May 2018 12:50:48 +0000 (14:50 +0200)]
avfilter/vf_neighbor: simplify code little

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_neighbor: rewrite without using temp memory
Paul B Mahol [Tue, 1 May 2018 11:12:50 +0000 (13:12 +0200)]
avfilter/vf_neighbor: rewrite without using temp memory

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/cbs_h2645: create a reference to the existing buffer when decomposing slice...
James Almer [Fri, 27 Apr 2018 23:44:39 +0000 (20:44 -0300)]
avcodec/cbs_h2645: create a reference to the existing buffer when decomposing slice units

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
15 months agoavcodec/cbs_mpeg2: create a reference to the existing buffer when decomposing slice...
James Almer [Fri, 27 Apr 2018 22:08:42 +0000 (19:08 -0300)]
avcodec/cbs_mpeg2: create a reference to the existing buffer when decomposing slice units

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
15 months agofftools/ffmpeg: fix mixed code and declarations
James Almer [Mon, 30 Apr 2018 16:19:29 +0000 (13:19 -0300)]
fftools/ffmpeg: fix mixed code and declarations

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
15 months agoavdevice/decklink_dec: unref packets on avpacket_queue_put error
Marton Balint [Sun, 22 Apr 2018 21:09:05 +0000 (23:09 +0200)]
avdevice/decklink_dec: unref packets on avpacket_queue_put error

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoavdevice/decklink_dec: do not copy video data
Marton Balint [Sun, 22 Apr 2018 20:29:09 +0000 (22:29 +0200)]
avdevice/decklink_dec: do not copy video data

Create a buffer from the data instead and use the buffer destructor to free the
DeckLink frame. This avoids a memcpy of the frame data.

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoUse AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was used
Marton Balint [Thu, 19 Apr 2018 21:14:24 +0000 (23:14 +0200)]
Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was used

Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and
avfiltergraph.c pick_format() until a paletted pixel format without alpha is
introduced.

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoavutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8
Marton Balint [Thu, 19 Apr 2018 21:00:47 +0000 (23:00 +0200)]
avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoavcodec/hnm4video: fix palette alpha
Marton Balint [Mon, 23 Apr 2018 18:46:49 +0000 (20:46 +0200)]
avcodec/hnm4video: fix palette alpha

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoavcodec/anm: fix palette alpha
Marton Balint [Mon, 23 Apr 2018 18:46:25 +0000 (20:46 +0200)]
avcodec/anm: fix palette alpha

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoavformat/qtpalette: parse color table according to the QuickTime file format specs
Marton Balint [Thu, 19 Apr 2018 18:11:02 +0000 (20:11 +0200)]
avformat/qtpalette: parse color table according to the QuickTime file format specs

The specs says that the the first color component in the color array is
not alpha, but simply 0.

Fixes 0 alpha of fate-suite/cvid/catfight-cvid-pal8-partial.mov

Signed-off-by: Marton Balint <cus@passwd.hu>
15 months agoavfilter/vf_mix: initialize last to silence possible warning
Paul B Mahol [Mon, 30 Apr 2018 18:42:17 +0000 (20:42 +0200)]
avfilter/vf_mix: initialize last to silence possible warning

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/mpeg4video_parser: Avoid litteral 0x1B6, use named constant instead
Michael Niedermayer [Mon, 30 Apr 2018 16:17:20 +0000 (18:17 +0200)]
avcodec/mpeg4video_parser: Avoid litteral 0x1B6, use named constant instead

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio frames
Michael Niedermayer [Sun, 29 Apr 2018 21:56:15 +0000 (23:56 +0200)]
avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio frames

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavformat/m4vdec: Use the same constant names as libavcodec
Michael Niedermayer [Mon, 30 Apr 2018 16:09:41 +0000 (18:09 +0200)]
avformat/m4vdec: Use the same constant names as libavcodec

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavformat/m4vdec: Fix detection of raw MPEG-4 ES Studio
Michael Niedermayer [Sun, 29 Apr 2018 21:56:14 +0000 (23:56 +0200)]
avformat/m4vdec: Fix detection of raw MPEG-4 ES Studio

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoconfigure: add missing pthreads dependency to v4l2_m2m
James Almer [Sun, 29 Apr 2018 18:04:10 +0000 (15:04 -0300)]
configure: add missing pthreads dependency to v4l2_m2m

Signed-off-by: James Almer <jamrial@gmail.com>
15 months agodoc/filters: add tmix examples
Paul B Mahol [Sun, 29 Apr 2018 17:36:25 +0000 (19:36 +0200)]
doc/filters: add tmix examples

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_mix: make setting weights more user friendly
Paul B Mahol [Sun, 29 Apr 2018 17:27:15 +0000 (19:27 +0200)]
avfilter/vf_mix: make setting weights more user friendly

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/wavpack: Fix integer overflow in DEC_MED() / INC_MED()
Michael Niedermayer [Fri, 27 Apr 2018 19:44:07 +0000 (21:44 +0200)]
avcodec/wavpack: Fix integer overflow in DEC_MED() / INC_MED()

Fixes: runtime error: signed integer overflow: 2147483637 + 128 cannot be represented in type 'int'
Fixes: 6701/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5358324934508544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/wavpack: Fix integer overflow in wv_unpack_stereo()
Michael Niedermayer [Fri, 27 Apr 2018 19:44:06 +0000 (21:44 +0200)]
avcodec/wavpack: Fix integer overflow in wv_unpack_stereo()

Fixes: runtime error: signed integer overflow: 2147483531 + 16384 cannot be represented in type 'int'
Fixes: 6615/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5165715515506688

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavfilter/vf_fieldmatch: add support for >8 bit depth in ppsrc
Paul B Mahol [Sat, 28 Apr 2018 22:11:13 +0000 (00:11 +0200)]
avfilter/vf_fieldmatch: add support for >8 bit depth in ppsrc

Also fix leaks while here.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_fieldmatch: switch to activate
Paul B Mahol [Sun, 29 Apr 2018 12:57:53 +0000 (14:57 +0200)]
avfilter/vf_fieldmatch: switch to activate

Unbreaks ppsrc filtering.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter: add amplify filter
Paul B Mahol [Fri, 27 Apr 2018 16:13:38 +0000 (18:13 +0200)]
avfilter: add amplify filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_overlay: use slice_end in alpha_composite()
Paul B Mahol [Sun, 29 Apr 2018 08:02:57 +0000 (10:02 +0200)]
avfilter/vf_overlay: use slice_end in alpha_composite()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/vc1: fix mquant calculation
Jerome Borsboom [Sat, 28 Apr 2018 15:15:32 +0000 (17:15 +0200)]
avcodec/vc1: fix mquant calculation

In vc1_decode_i_blocks_adv mquant needs to be reset to its default value for
each macroblock, instead of once at the beginning of the slice.

DQPROFILE specifies which macroblocks can have an alternative quantizer step
size. When DQPROFILE specifies edges, the selection is applicable to the edges
of the picture. Slice edges are not selected by DQPROFILE.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavfilter/vf_fieldmatch: use correct subsamplings for y0a, y1a and startx
Paul B Mahol [Sat, 28 Apr 2018 19:01:27 +0000 (21:01 +0200)]
avfilter/vf_fieldmatch: use correct subsamplings for y0a, y1a and startx

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agodoc/ffmpeg - update benchmark option readout details
Gyan Doshi [Sat, 28 Apr 2018 17:21:04 +0000 (22:51 +0530)]
doc/ffmpeg - update benchmark option readout details

-benchmark and -benchmark_all now show real, system and user time

15 months agoavfilter/vf_overlay: add slice threading
Paul B Mahol [Fri, 27 Apr 2018 11:51:47 +0000 (13:51 +0200)]
avfilter/vf_overlay: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agofftools/ffmpeg: change fps progress log message to show two decimal digits
André Camargo [Fri, 27 Apr 2018 23:00:33 +0000 (20:00 -0300)]
fftools/ffmpeg: change fps progress log message to show two decimal digits

Useful when transcoding videos at 29.97 fps because delivers a more accurate result for monitoring.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoswresample/arm: rename labels to fix xcode build error
Rahul Chaudhry [Fri, 27 Apr 2018 20:49:52 +0000 (13:49 -0700)]
swresample/arm: rename labels to fix xcode build error

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agofftools/ffmpeg: Add system time and real time to benchmarking.
Mark Wachsler [Fri, 27 Apr 2018 17:31:59 +0000 (13:31 -0400)]
fftools/ffmpeg: Add system time and real time to benchmarking.

The -benchmark and -benchmark_all options now show user, system, and real time,
instead of just user time.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agodoc/libav-merge: remove resolved item
Paul B Mahol [Sat, 28 Apr 2018 12:15:41 +0000 (14:15 +0200)]
doc/libav-merge: remove resolved item

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/proresdec2: add missing frame color metadata
Paul B Mahol [Sat, 28 Apr 2018 11:58:05 +0000 (13:58 +0200)]
avcodec/proresdec2: add missing frame color metadata

Stolen from removed decoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec/proresdec2: make long name more descriptive
Paul B Mahol [Sat, 28 Apr 2018 10:45:04 +0000 (12:45 +0200)]
avcodec/proresdec2: make long name more descriptive

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavcodec: remove duplicate prores decoder
Paul B Mahol [Thu, 26 Apr 2018 13:01:05 +0000 (15:01 +0200)]
avcodec: remove duplicate prores decoder

Removed slower one, couldn't figure out why it is slower.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_convolution: make rdiv set to 0 more useful
Paul B Mahol [Sat, 28 Apr 2018 09:25:43 +0000 (11:25 +0200)]
avfilter/vf_convolution: make rdiv set to 0 more useful

Use 0 for signaling that rdiv will be calculated from sum
of all matrix elements.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agohwcontext_vaapi: Fix compilation with libva versions < 1.4.0
Mark Thompson [Fri, 27 Apr 2018 12:41:56 +0000 (13:41 +0100)]
hwcontext_vaapi: Fix compilation with libva versions < 1.4.0

The BufferHandle API was added in libva 1.4.0 / VAAPI 0.36.0.

15 months agoavfilter/vf_mix: use correct linesizes
Paul B Mahol [Fri, 27 Apr 2018 17:15:55 +0000 (19:15 +0200)]
avfilter/vf_mix: use correct linesizes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_shuffleplanes: add support for timeline
Paul B Mahol [Fri, 27 Apr 2018 15:18:22 +0000 (17:18 +0200)]
avfilter/vf_shuffleplanes: add support for timeline

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_premultiply: add slice threading
Paul B Mahol [Fri, 27 Apr 2018 10:25:32 +0000 (12:25 +0200)]
avfilter/vf_premultiply: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_maskedclamp: silence warning
Paul B Mahol [Fri, 27 Apr 2018 09:35:18 +0000 (11:35 +0200)]
avfilter/vf_maskedclamp: silence warning

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_mix: add slice threading
Paul B Mahol [Fri, 27 Apr 2018 09:32:50 +0000 (11:32 +0200)]
avfilter/vf_mix: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavformat/mpegts: set AV_DISPOSITION_DESCRIPTIONS for OIPF cases
Łukasz Krzciuk [Fri, 13 Apr 2018 12:57:57 +0000 (14:57 +0200)]
avformat/mpegts: set AV_DISPOSITION_DESCRIPTIONS for OIPF cases

1. an audio component with an ISO_639_language_descriptor in the PMT with the
audio_type field set to 0x03
2. a supplementary_audio_descriptor with the editorial_classification field set
to 0x01
3. an ac-3_descriptor or an enhanced_ac-3_descriptor with a component_type field
with the service_type flags set to Visually Impaired

Tested-by: Łukasz Krzciuk <lkrzciuk@vewd.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/cbs_mpeg2: use existing buffer reference when splitting fragments
James Almer [Wed, 25 Apr 2018 22:35:46 +0000 (19:35 -0300)]
avcodec/cbs_mpeg2: use existing buffer reference when splitting fragments

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
15 months agoavcodec/cbs: create reference counted fragments in ff_cbs_read_extradata()
James Almer [Wed, 25 Apr 2018 22:27:04 +0000 (19:27 -0300)]
avcodec/cbs: create reference counted fragments in ff_cbs_read_extradata()

This way, every CodedBitstreamType->split_fragment() function can
safely assume the fragment passed to them will be reference counted,
potentially simplifying code.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
15 months agoavfilter/vf_maskedclamp: add slice threading
Paul B Mahol [Thu, 26 Apr 2018 21:35:42 +0000 (23:35 +0200)]
avfilter/vf_maskedclamp: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_atadenoise: do not abort if user specified invalid size
Paul B Mahol [Thu, 26 Apr 2018 15:57:20 +0000 (17:57 +0200)]
avfilter/vf_atadenoise: do not abort if user specified invalid size

Update documentation with new size default.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agolavf/http: use AV_OPT_FLAG_DEPRECATED for user-agent option
Clément Bœsch [Sun, 22 Apr 2018 14:31:04 +0000 (16:31 +0200)]
lavf/http: use AV_OPT_FLAG_DEPRECATED for user-agent option

15 months agolavu/opt: add AV_OPT_FLAG_DEPRECATED
Clément Bœsch [Sun, 22 Apr 2018 14:30:19 +0000 (16:30 +0200)]
lavu/opt: add AV_OPT_FLAG_DEPRECATED

15 months agolavu/threadmessage: add av_thread_message_queue_nb_elems()
Clément Bœsch [Sat, 21 Apr 2018 19:42:19 +0000 (21:42 +0200)]
lavu/threadmessage: add av_thread_message_queue_nb_elems()

15 months agoavcodec/vc1: fix out of bounds access of overlap filter
Jerome Borsboom [Thu, 26 Apr 2018 14:49:04 +0000 (16:49 +0200)]
avcodec/vc1: fix out of bounds access of overlap filter

Overlap filtering of the first row and first column must be guarded
for out of bounds access of v->over_flags_plane.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavfilter/vf_mix: clip output pixel values
Paul B Mahol [Wed, 25 Apr 2018 11:07:34 +0000 (13:07 +0200)]
avfilter/vf_mix: clip output pixel values

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter/vf_mix: add scale option
Paul B Mahol [Tue, 24 Apr 2018 12:45:19 +0000 (14:45 +0200)]
avfilter/vf_mix: add scale option

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agoavfilter: add tmix filter
Paul B Mahol [Tue, 24 Apr 2018 11:45:13 +0000 (13:45 +0200)]
avfilter: add tmix filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
15 months agomov: Properly abide by the track's media duration
Derek Buitenhuis [Mon, 23 Apr 2018 15:46:55 +0000 (16:46 +0100)]
mov: Properly abide by the track's media duration

The track's media duration from the mdhd atom takes precedence
over both the stts and elst atom for calculating and setting
the track's total duraion.

Technically, we shouldn't be using the stts atom at all for
calculating stream durations.

This fixes incorrect stream and final packet durations on files
with edit lists that are longer than the media duration.

The FATE changes are expected, and output is more correct (the
AAC frame is not 1028 samples).

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
15 months agolavf/rtmpcrypt: Add a cast to silence an unavoidable warning.
Carl Eugen Hoyos [Sun, 15 Apr 2018 22:14:24 +0000 (00:14 +0200)]
lavf/rtmpcrypt: Add a cast to silence an unavoidable warning.

The av_rc4_crypt() documentation allows src == dst.

Silences the following warning:
libavformat/rtmpcrypt.c:304:36: warning: passing argument 2 of 'av_rc4_crypt' discards 'const' qualifier from pointer target type

Reported-by: Reino Wijnsma
15 months agoavformat/dashenc: Set mp4 as the default format for VP9
Karthick Jeyapal [Mon, 23 Apr 2018 06:10:33 +0000 (11:40 +0530)]
avformat/dashenc: Set mp4 as the default format for VP9

There is a separate muxer(webmdashenc.c) for supporting VP9+webm output in DASH.
Hence in this muxer we will focus on supporting VP9 in MP4
Have verified playout support of VP9+MP4 in Chrome and Firefox.

15 months agoavformat/dashenc: Set VP9 codec string with profile, level and bitdepth
Karthick Jeyapal [Mon, 23 Apr 2018 06:10:32 +0000 (11:40 +0530)]
avformat/dashenc: Set VP9 codec string with profile, level and bitdepth

Otherwise some versions of chrome browser returns "codec not supported" error

15 months agoavformat/vpcc: Calculate VP9 level from Luma's Sample rate and Picture size
Karthick Jeyapal [Mon, 23 Apr 2018 06:10:31 +0000 (11:40 +0530)]
avformat/vpcc: Calculate VP9 level from Luma's Sample rate and Picture size

15 months agoavformat/dashdec: fix compling warning "filename is deprecated"
Steven Liu [Thu, 26 Apr 2018 08:17:15 +0000 (16:17 +0800)]
avformat/dashdec: fix compling warning "filename is deprecated"

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
15 months agofix memory leak of parsing dash MPD
guikunzhi [Thu, 26 Apr 2018 04:40:52 +0000 (12:40 +0800)]
fix memory leak of parsing dash MPD

Signed-off-by: guikunzhi <guikunzhi@163.com>
15 months agoavcodec/error_resilience: Fix integer overflow in filter181()
Michael Niedermayer [Sun, 22 Apr 2018 19:46:05 +0000 (21:46 +0200)]
avcodec/error_resilience: Fix integer overflow in filter181()

Fixes: runtime error: signed integer overflow: 197710 * 10923 cannot be represented in type 'int'
Fixes: 7010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5667127596941312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/h263dec: Check slice_ret in mspeg4 slice loop
Michael Niedermayer [Sun, 22 Apr 2018 19:07:45 +0000 (21:07 +0200)]
avcodec/h263dec: Check slice_ret in mspeg4 slice loop

Fixes infinite loop
Fixes: 6858/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_MSMPEG4V3_fuzzer-4681563766784000
Fixes: 6890/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_WMV1_fuzzer-4756103142309888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/h2645_parse: Replace RNXYA by RNXY in ff_h2645_extract_rbsp()
Michael Niedermayer [Sat, 10 Mar 2018 20:32:51 +0000 (21:32 +0100)]
avcodec/h2645_parse: Replace RNXYA by RNXY in ff_h2645_extract_rbsp()

Fixes misaligned accesses
Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/elsdec: Fix memleaks
Michael Niedermayer [Tue, 24 Apr 2018 23:54:17 +0000 (01:54 +0200)]
avcodec/elsdec: Fix memleaks

Fixes: 6798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5135899701542912

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
15 months agoavcodec/vc1: more corrections for AC inverse quantization scaling
Jerome Borsboom [Wed, 25 Apr 2018 18:07:53 +0000 (20:07 +0200)]
avcodec/vc1: more corrections for AC inverse quantization scaling

HALFQP should only be added to the inverse quantizer when the block is
coded with PQUANT. When PQUANT is equal to ALTPQUANT, the original test
for the addition of HALFQP fails. A negative value for mquant indicates
that the value was derived from VOPDQUANT.

Fixes #4372

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: correct forgotten v->blocks_off
Jerome Borsboom [Mon, 23 Apr 2018 19:00:33 +0000 (21:00 +0200)]
avcodec/vc1: correct forgotten v->blocks_off

correct forgotten v->blocks_off

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: correct AC inverse quantization scaling
Jerome Borsboom [Mon, 23 Apr 2018 19:00:15 +0000 (21:00 +0200)]
avcodec/vc1: correct AC inverse quantization scaling

HALFQP should only be added to the inverse quantizer when the block is
coded with PQUANT. See 8.1.3.8 in VC-1 spec.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: correct mspel for field-interlace B frames
Jerome Borsboom [Mon, 23 Apr 2018 19:00:08 +0000 (21:00 +0200)]
avcodec/vc1: correct mspel for field-interlace B frames

mspel indicates the use of bicubic interpolation. The check wrongly included
MVMODE MV_PMODE_1MV_HPEL as using bilinear interpolation.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: remove unused overlap smooting and loop filter
Jerome Borsboom [Mon, 23 Apr 2018 19:00:02 +0000 (21:00 +0200)]
avcodec/vc1: remove unused overlap smooting and loop filter

remove unused overlap smooting and loop filter

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: add overlap smooting and loop filter for frame/field-interlace
Jerome Borsboom [Mon, 23 Apr 2018 18:59:55 +0000 (20:59 +0200)]
avcodec/vc1: add overlap smooting and loop filter for frame/field-interlace

Add previously omitted overlap smooting and loop filtering for
frame/field-interlace pictures. For progressive pictures switch to the
re-implemented versions of overlap smooting and loop filtering.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: re-implement vc1_put_signed_blocks_clamped
Jerome Borsboom [Mon, 23 Apr 2018 18:59:49 +0000 (20:59 +0200)]
avcodec/vc1: re-implement vc1_put_signed_blocks_clamped

The existing implementation only used vc1_put_signed_blocks_clamped for I and
BI frames. This rewritten version is also applicable to P frame both
progressive and frame/field-interlace.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
15 months agoavcodec/vc1: implement interlaced out-of-bounds reference pixel replication
Jerome Borsboom [Mon, 23 Apr 2018 18:59:41 +0000 (20:59 +0200)]
avcodec/vc1: implement interlaced out-of-bounds reference pixel replication

The existing implementation did out-of-bounds reference pixel replication for
progressive reference frames. In interlaced reference frames both the even and
odd line on the horizontal edges need to be replicated.

Fixes #3262.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>