]> git.sesse.net Git - ffmpeg/log
ffmpeg
6 years agoopus_rc: fix encoder desyncs on very low bitrates
Rostislav Pehlivanov [Mon, 10 Jul 2017 22:40:35 +0000 (23:40 +0100)]
opus_rc: fix encoder desyncs on very low bitrates

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoopusenc: don't set avctx->cutoff
Rostislav Pehlivanov [Mon, 10 Jul 2017 22:43:53 +0000 (23:43 +0100)]
opusenc: don't set avctx->cutoff

Its only use is to adjust the aac psychoacoustic/filter system which
isn't used here.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoopustab: comment ff_celt_tf_select
Rostislav Pehlivanov [Mon, 10 Jul 2017 22:39:56 +0000 (23:39 +0100)]
opustab: comment ff_celt_tf_select

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoopus_celt: move postfilter taps table to the shared opustab.c file
Rostislav Pehlivanov [Mon, 10 Jul 2017 22:31:24 +0000 (23:31 +0100)]
opus_celt: move postfilter taps table to the shared opustab.c file

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agortspdec: Fix return error
Derek Buitenhuis [Thu, 6 Jul 2017 18:03:58 +0000 (14:03 -0400)]
rtspdec: Fix return error

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agodxva: DXVA2_ModeHEVC_VLD_Main10 does not support Main
wm4 [Mon, 10 Jul 2017 13:59:38 +0000 (15:59 +0200)]
dxva: DXVA2_ModeHEVC_VLD_Main10 does not support Main

This mode apparently does not support decoding of HEVC Main (8 bit).
With D3D11 and Intel drivers on Windows 10 I get green corruption, while
using DXVA2_ModeHEVC_VLD_Main works.

6 years agoavcodec/magicyuv: add 12 bit formats
Paul B Mahol [Sun, 9 Jul 2017 16:40:13 +0000 (18:40 +0200)]
avcodec/magicyuv: add 12 bit formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/magicyuv: make RLE table reading match reference
Paul B Mahol [Mon, 10 Jul 2017 09:47:42 +0000 (11:47 +0200)]
avcodec/magicyuv: make RLE table reading match reference

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavformat/avio: Remove no-op code in url_find_protocol().
Wan-Teh Chang [Fri, 7 Jul 2017 02:18:50 +0000 (19:18 -0700)]
avformat/avio: Remove no-op code in url_find_protocol().

In url_find_protocol(), proto_str is either "file" or a string
consisting of only the characters in URL_SCHEME_CHARS, which does not
include ','. Therefore the strchr(proto_str, ',') call always returns
NULL.

Note: The code was added in commit
6161c41817f6e53abb3021d67ca0f19def682718.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
6 years agoavcodec/noise_bsf: add support for dropping packets
Marton Balint [Sat, 8 Jul 2017 10:37:59 +0000 (12:37 +0200)]
avcodec/noise_bsf: add support for dropping packets

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavcodec/ylc: Fix vlc of 31 bits
Michael Niedermayer [Sat, 8 Jul 2017 20:51:57 +0000 (22:51 +0200)]
avcodec/ylc: Fix vlc of 31 bits

Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 2515/clusterfuzz-testcase-minimized-6197200012967936
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>
6 years agoavcodec/sbrdsp_fixed: Fix integer overflow in sbr_hf_apply_noise()
Michael Niedermayer [Sun, 2 Jul 2017 01:30:54 +0000 (03:30 +0200)]
avcodec/sbrdsp_fixed: Fix integer overflow in sbr_hf_apply_noise()

Fixes: runtime error: signed integer overflow: -2049425300 + -117591631 cannot be represented in type 'int'
Fixes: part of 2096/clusterfuzz-testcase-minimized-4901566068817920
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolibswresample: check input to swr_convert_frame for NULL
hexpointer [Fri, 7 Jul 2017 09:54:47 +0000 (10:54 +0100)]
libswresample: check input to swr_convert_frame for NULL

When 'out' is an AVFrame that does not have buffers preallocated,
swr_convert_frame tries to allocate buffers of the right size. However
in calculating this size it failed to check for whether 'in' is NULL
(requesting that swr's internal buffers are to be flushed).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter: add limiter filter
Paul B Mahol [Mon, 3 Jul 2017 15:42:03 +0000 (17:42 +0200)]
avfilter: add limiter filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agobitstream_filter: Add missing error check
Derek Buitenhuis [Thu, 6 Jul 2017 18:11:28 +0000 (14:11 -0400)]
bitstream_filter: Add missing error check

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoaf_amix: Add missing error check
Derek Buitenhuis [Thu, 6 Jul 2017 18:08:40 +0000 (14:08 -0400)]
af_amix: Add missing error check

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agortmpproto: Fix error return
Derek Buitenhuis [Thu, 6 Jul 2017 17:59:40 +0000 (13:59 -0400)]
rtmpproto: Fix error return

Mistake was added in 5840473890440dbe0bd2cce530ebb3d93e187ae6.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agocngenc: Remove dead store
Derek Buitenhuis [Thu, 6 Jul 2017 17:54:43 +0000 (13:54 -0400)]
cngenc: Remove dead store

ff_lpc_calc_ref_coeffs returns the order it is given and cannot return
in error.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoffmpeg_opt: Make get_timecode actually return errors
Derek Buitenhuis [Thu, 6 Jul 2017 17:52:42 +0000 (13:52 -0400)]
ffmpeg_opt: Make get_timecode actually return errors

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoopusdec: Remove dead code
Derek Buitenhuis [Thu, 6 Jul 2017 17:51:18 +0000 (13:51 -0400)]
opusdec: Remove dead code

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoscpr: Added missing error check
Derek Buitenhuis [Thu, 6 Jul 2017 17:47:42 +0000 (13:47 -0400)]
scpr: Added missing error check

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoaf_tempo: Add missing error check
Derek Buitenhuis [Thu, 6 Jul 2017 17:45:13 +0000 (13:45 -0400)]
af_tempo: Add missing error check

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agobitpacked: Remove dead store
Derek Buitenhuis [Thu, 6 Jul 2017 17:39:57 +0000 (13:39 -0400)]
bitpacked: Remove dead store

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoavformat: remove obsolete commented-out DEBUG define
Tobias Rapp [Fri, 7 Jul 2017 07:43:22 +0000 (09:43 +0200)]
avformat: remove obsolete commented-out DEBUG define

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agolibavcodec/htmlsubtitles.c: make tags case-insensitive
DongHoon Kang [Fri, 16 Jun 2017 11:26:37 +0000 (20:26 +0900)]
libavcodec/htmlsubtitles.c: make tags case-insensitive

Signed-off-by: DongHoon Kang <nanuda.kang@gmail.com>
Signed-off-by: Clément Bœsch <u@pkh.me>
6 years agoavcodec/fft_template: use ff_thread_once on costable initialization
Muhammad Faiz [Wed, 5 Jul 2017 05:33:22 +0000 (12:33 +0700)]
avcodec/fft_template: use ff_thread_once on costable initialization

Make it thread-safe and avoid redundant initialization.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
6 years agoavformat/hlsenc: Add missing error check
Derek Buitenhuis [Fri, 7 Jul 2017 02:08:18 +0000 (10:08 +0800)]
avformat/hlsenc: Add missing error check

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoavformat/hlsenc: add warn message when use both fmp4 and single_file
Steven Liu [Fri, 7 Jul 2017 02:05:54 +0000 (10:05 +0800)]
avformat/hlsenc: add warn message when use both fmp4 and single_file

have not implementation the fmp4 single file yet before this commit.

Suggested-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
6 years agoffmpeg: Fix typos in the comment for decode() ("." vs. "->")
Wan-Teh Chang [Thu, 6 Jul 2017 16:42:24 +0000 (09:42 -0700)]
ffmpeg: Fix typos in the comment for decode() ("." vs. "->")

pkt is a pointer, so it should be dereferenced with the -> operator.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoh264dec: remove unneeded prototype
Rafaël Carré [Thu, 6 Jul 2017 11:04:03 +0000 (13:04 +0200)]
h264dec: remove unneeded prototype

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agompegtsenc: Don't pass NULL to memcpy
Derek Buitenhuis [Thu, 6 Jul 2017 17:23:06 +0000 (13:23 -0400)]
mpegtsenc: Don't pass NULL to memcpy

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoconfigure: require pkg-config for libvorbis
Ricardo Constantino [Tue, 4 Jul 2017 18:01:22 +0000 (19:01 +0100)]
configure: require pkg-config for libvorbis

libvorbis comes with pkg-config files since at least v1.0.1, way back in 2003.

We need the two checks for vorbis and vorbisenc because we use functions from
both and Xiph considers them separate libraries.

The check is inverted (vorbis first then vorbisenc) because add_extralibs()
prepends to EXTRALIBS instead of appending. For both shared and static linking
the order didn't seem to matter anyway, testing with MinGW.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoconcatdec: Do not pass NULL to memcmp
Derek Buitenhuis [Thu, 6 Jul 2017 17:15:00 +0000 (13:15 -0400)]
concatdec: Do not pass NULL to memcmp

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agohtmlsubtitles: support <br> tag
wm4 [Mon, 3 Jul 2017 11:42:44 +0000 (13:42 +0200)]
htmlsubtitles: support <br> tag

Some .srt files use this tag.

(An alternative implementation would be correctly ignoring unknown tags,
and treating them as whitespace. libass can do automatic line wrapping.)

6 years agoavcodec/interplayvideo: Clean up frames on parameter change
Michael Niedermayer [Thu, 6 Jul 2017 01:46:44 +0000 (03:46 +0200)]
avcodec/interplayvideo: Clean up frames on parameter change

Fixes: out of array access
Fixes: 2467/clusterfuzz-testcase-minimized-4755798049685504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolibavformat/gdv: Fix parsing for soundless video
Azamat H. Hackimov [Sun, 2 Jul 2017 20:10:55 +0000 (01:10 +0500)]
libavformat/gdv: Fix parsing for soundless video

Added 2 byte skipping if there no sound present, that fixes playback
files without sound stream.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agomovenc: allow alternative hvc1 h.265 codec tag
John Stebbins [Thu, 15 Jun 2017 18:47:16 +0000 (11:47 -0700)]
movenc: allow alternative hvc1 h.265 codec tag

If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for
h.265 streams. QuickTime (and other Apple software) requires 'hvc1'.

(cherry picked from commit 84ab1cc437fa47a00532f305b9fe15b5b66c8c5e)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agomovenc: write correct format hvcc when tag is hvc1
John Stebbins [Thu, 15 Jun 2017 18:41:15 +0000 (11:41 -0700)]
movenc: write correct format hvcc when tag is hvc1

(cherry picked from commit 1ea9b7fdf99b60c0db95a2ce97b2108469bbb245)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agomovenc: move tags definitions to where they are used
John Stebbins [Mon, 19 Jun 2017 14:53:45 +0000 (07:53 -0700)]
movenc: move tags definitions to where they are used

(cherry picked from commit 1c64bae648eeb39c8d8a8d81ee142b9eec9fae7b)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agomovenc: simplify codec_tag lookup
John Stebbins [Mon, 19 Jun 2017 14:46:48 +0000 (07:46 -0700)]
movenc: simplify codec_tag lookup

mux.c init_muxer() already sets codec_tag correctly in the cases
simplified here.

This also adds the capability to support alternative tags for the
same codec_id.

(cherry picked from commit f6f86f432fe51526a7aad2bdb025d6a45d239883)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agofate: add fate-checkasm-sbrdsp target
James Almer [Wed, 5 Jul 2017 19:54:10 +0000 (16:54 -0300)]
fate: add fate-checkasm-sbrdsp target

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoRevert "x86/sbrdsp: remove unnecessary sign extend instruction in apply_noise_main"
James Almer [Wed, 5 Jul 2017 13:28:03 +0000 (10:28 -0300)]
Revert "x86/sbrdsp: remove unnecessary sign extend instruction in apply_noise_main"

This reverts commit 24bb7db4037876c5722b0eecf7412502e7225634.

noise has to after all be sign extended, not zero extended, on tests
other than checkasm.
Fixes most aac tests broken by the now reverted commit.

6 years agoavformat/hlsenc: copy codec_tag when stream copy
Steven Liu [Wed, 5 Jul 2017 03:20:21 +0000 (11:20 +0800)]
avformat/hlsenc: copy codec_tag when stream copy

when use fmp4 segment type in hls and use codec copy,
there have an error message.
error message:
   [mp4 @ 0x25df020] Tag avc1 incompatible with output codec id '28' ([33][0][0][0])
   [hls @ 0x2615c80] Some of the provided format options in '(null)' are not recognized
   Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
this patch can fix it.

Signed-off-by: Liu Qi <w_liuqi@kingsoft.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
6 years agoavformat/hlsenc: optimize help message default value.
Steven Liu [Wed, 5 Jul 2017 03:15:20 +0000 (11:15 +0800)]
avformat/hlsenc: optimize help message default value.

show the hls_segment_type default always 0, show the flag name better

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
6 years agoavcodec/hevcdec: do not let updated extradata corrupt state
Michael Niedermayer [Tue, 4 Jul 2017 20:33:52 +0000 (22:33 +0200)]
avcodec/hevcdec: do not let updated extradata corrupt state

Fixes: out of array access
Fixes: 2451/clusterfuzz-testcase-minimized-4781613957251072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agox86/sbrdsp: remove unnecessary sign extend instruction in apply_noise_main
James Almer [Wed, 5 Jul 2017 02:35:29 +0000 (23:35 -0300)]
x86/sbrdsp: remove unnecessary sign extend instruction in apply_noise_main

noise needs to be zero extended and it can be done implicitly as a side effect
in a subsequent instruction.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agocheckasm: use declare_func_float() in sbrdsp sum_square test
James Almer [Wed, 5 Jul 2017 02:02:48 +0000 (23:02 -0300)]
checkasm: use declare_func_float() in sbrdsp sum_square test

The function returns a float.

This fixes the test in x86_32 targets.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agox86/sbrdsp: zero extend m_max in apply_noise_main
James Almer [Tue, 4 Jul 2017 18:05:47 +0000 (15:05 -0300)]
x86/sbrdsp: zero extend m_max in apply_noise_main

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agox86/utvideodsp: make restore_rgb_planes functions work on x86_32
James Almer [Fri, 30 Jun 2017 03:40:16 +0000 (00:40 -0300)]
x86/utvideodsp: make restore_rgb_planes functions work on x86_32

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/wavpack: Fix invalid shift
Michael Niedermayer [Tue, 27 Jun 2017 11:47:32 +0000 (13:47 +0200)]
avcodec/wavpack: Fix invalid shift

Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 2377/clusterfuzz-testcase-minimized-6108505935183872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/h264_slice: Fix signed integer overflow
Michael Niedermayer [Tue, 4 Jul 2017 22:05:11 +0000 (00:05 +0200)]
avcodec/h264_slice: Fix signed integer overflow

Fixes: runtime error: signed integer overflow: 26 + 2147483644 cannot be represented in type 'int'
Fixes: 2456/clusterfuzz-testcase-minimized-4822695051001856
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agomovenc: use correct tag list for AVOutputFormat.codec_tag
John Stebbins [Thu, 15 Jun 2017 18:20:48 +0000 (11:20 -0700)]
movenc: use correct tag list for AVOutputFormat.codec_tag

ff_mp4_obj_type contains the wrong type of tags for
AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to
validate AVCodecParameters.codec_tag so needs to be the same
type of tag.

Creates new tag lists for mp4 and ismv.  New tag lists support
same list of codecs found in ff_mp4_obj_type. psp uses the same
tag list as mp4 since these both use mp4_get_codec_tag to look up tags.

(cherry picked from commit 713efb2c0d013a42be4051adb7cd90a7c2cbbb4f)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agolavf: Remove codec_tag from dashenc and smoothstreamingenc
Martin Storsjö [Fri, 30 Jun 2017 09:49:49 +0000 (12:49 +0300)]
lavf: Remove codec_tag from dashenc and smoothstreamingenc

Skip the codec_tag altogether here, to let the user (try to) set
whichever codec/tag is preferred; the individual chained muxer will
reject invalid codecs anyway.

(cherry picked from commit 61f589e31e84ae02d7ac6837f30f19c437b1fc2e)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agolibavfilter/scale2ref: Maintain main input's DAR
Kevin Mark [Mon, 5 Jun 2017 10:55:21 +0000 (06:55 -0400)]
libavfilter/scale2ref: Maintain main input's DAR

The scale2ref filter will now maintain the DAR of the main input and
not the DAR of the reference input. This previous behavior was deemed
counterintuitive for most (all?) use-cases.

Before:
scale2ref=iw/4:ow/mdar
in  w:320 h:240 fmt:rgb24 sar:1/1
ref w:640 h:360 fmt:rgb24 sar:1/1
out w:160 h:120 fmt:rgb24 sar:4/3 flags:0x2
SAR: ((120 * 640) / (160 * 360)) * (1 / 1) = 4 / 3
DAR: (160 / 120) * (4 / 3) = 16 / 9
(main out now same DAR as ref)

Now:
scale2ref=iw/4:ow/mdar
in  w:320 h:240 fmt:rgb24 sar:1/1
ref w:640 h:360 fmt:rgb24 sar:1/1
out w:160 h:120 fmt:rgb24 sar:1/1 flags:0x2
SAR: ((120 * 320) / (160 * 240)) * (1 / 1) = 1 / 1
DAR: (160 / 120) * (1 / 1) = 4 / 3
(main out same DAR as main in)

The scale2ref FATE test has also been updated.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter/vf_ssim: use unsigned so result can be properly stored
Paul B Mahol [Tue, 4 Jul 2017 08:21:14 +0000 (10:21 +0200)]
avfilter/vf_ssim: use unsigned so result can be properly stored

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/alsdec: fix some undefined shifts
Paul B Mahol [Mon, 3 Jul 2017 09:48:13 +0000 (11:48 +0200)]
avcodec/alsdec: fix some undefined shifts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/alsdec: remove unused header
Paul B Mahol [Sat, 1 Jul 2017 19:53:03 +0000 (21:53 +0200)]
avcodec/alsdec: remove unused header

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agolavc/mediacodec: rescale pts before decoding for both hw and sw buffers
Aman Gupta [Mon, 3 Jul 2017 16:21:50 +0000 (09:21 -0700)]
lavc/mediacodec: rescale pts before decoding for both hw and sw buffers

Replicates the logic used in the wrap_hw_buffer path to wrap_sw_buffer
as well.

Fixes decoding issues observed on AMLogic devices with
OMX.amlogic.mpeg2.decoder.awesome, where the decoder would spit out a
constant stream of "mPtsRecoveryCount" errors and decoded frames were
returned in the incorrect order.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
6 years agolavc/mediacodec: add missing newline on warning
Aman Gupta [Mon, 3 Jul 2017 18:07:36 +0000 (11:07 -0700)]
lavc/mediacodec: add missing newline on warning

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
6 years agolavc/aarch64: add sbrdsp neon implementation
Matthieu Bouron [Tue, 23 May 2017 14:29:35 +0000 (14:29 +0000)]
lavc/aarch64: add sbrdsp neon implementation

autocorrelate_c: 644.0
autocorrelate_neon: 420.0
hf_apply_noise_0_c: 1688.5
hf_apply_noise_0_neon: 1498.6
hf_apply_noise_1_c: 1691.2
hf_apply_noise_1_neon: 1500.6
hf_apply_noise_2_c: 1688.1
hf_apply_noise_2_neon: 1500.3
hf_apply_noise_3_c: 1696.6
hf_apply_noise_3_neon: 1502.2
hf_g_filt_c: 2117.8
hf_g_filt_neon: 1218.7
hf_gen_c: 4573.4
hf_gen_neon: 2461.0
neg_odd_64_c: 72.0
neg_odd_64_neon: 64.7
qmf_deint_bfly_c: 1107.6
qmf_deint_bfly_neon: 291.6
qmf_deint_neg_c: 210.4
qmf_deint_neg_neon: 107.4
qmf_post_shuffle_c: 163.0
qmf_post_shuffle_neon: 107.7
qmf_pre_shuffle_c: 120.5
qmf_pre_shuffle_neon: 110.7
sum64x5_c: 1361.6
sum64x5_neon: 435.4
sum_square_c: 1686.4
sum_square_neon: 787.2

6 years agocheckasm: add sbrdsp tests
Matthieu Bouron [Fri, 9 Jun 2017 09:34:12 +0000 (09:34 +0000)]
checkasm: add sbrdsp tests

6 years agoavfomat/hlsenc: support fmp4 format in hls
Steven Liu [Mon, 3 Jul 2017 12:20:44 +0000 (20:20 +0800)]
avfomat/hlsenc: support fmp4 format in hls

add the fmp4 format into hlsenc
because the fmp4 format add into hls from version 7.
the spec link is:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-20
and the describe on WWDC
https://developer.apple.com/videos/play/wwdc2017/515/

Signed-off-by: Steven Liu <lq@onvideo.cn>
6 years agovdpau: do not use buggy HEVC support by default
wm4 [Sat, 1 Jul 2017 09:40:10 +0000 (11:40 +0200)]
vdpau: do not use buggy HEVC support by default

NVIDIA broke its own API when using VDPAU decoding. If you retrieve the
decoded YUV data, or if you map the surfaces with GL interop, the result
are interlacing artifacts. The only way to get non-broken data is by
using the vdpau video mixer to convert it to RGB. There is no way to
block the non-working operations in a reasonable way (a VdpVideoSurface
has to support all operations).

NVIDIA refuses to fix this issue (they "fixed" it by making it work with
the video mixer, but the rest is still broken). There is no sign of that
changing.

Do not use HEVC by default with the generic hwaccle API. Detect whether
it's the NVIDIA native implementation, and exit with an error. (The same
thing work with the MESA implementation.)

As an escape hatch and to allow applications to use the decoder if they
really want to (perhaps because they make sure to explicitly use the
video mixer), reuse AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH to disable
this check.

Once NVIDIA fixes the bug, working driver versions could be detected,
and it could be allowed again.

6 years agoavcodec/alsdec: call correct function for multi-channel coding
Paul B Mahol [Sat, 1 Jul 2017 20:19:37 +0000 (22:19 +0200)]
avcodec/alsdec: call correct function for multi-channel coding

Fixes #5942.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/imc: cast float to int prior to comparing with int variable
Kostya Shishkov [Mon, 26 Jun 2017 10:41:13 +0000 (12:41 +0200)]
avcodec/imc: cast float to int prior to comparing with int variable

Update FATE test.

Fixes #3886.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/s302m: fix AVOption flags
foo86 [Tue, 27 Jun 2017 09:59:15 +0000 (12:59 +0300)]
avcodec/s302m: fix AVOption flags

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agocheckasm: randomize the full input buffer in test_hybrid_analysis
James Almer [Sat, 1 Jul 2017 01:33:04 +0000 (22:33 -0300)]
checkasm: randomize the full input buffer in test_hybrid_analysis

Missed in the last commit.

6 years agocheckasm: fix size of input buffer in test_hybrid_analysis
James Almer [Fri, 30 Jun 2017 23:37:06 +0000 (20:37 -0300)]
checkasm: fix size of input buffer in test_hybrid_analysis

6 years agohevcdec: properly export some side data with frame threading
wm4 [Thu, 29 Jun 2017 13:36:55 +0000 (15:36 +0200)]
hevcdec: properly export some side data with frame threading

I noticed this with mastering display data. If frame threading is
enabled, this side data is exported only for some frames. It turns out
it's not properly propagated to the worker threads.

I didn't touch A53 captions, because that involves memory allocation and
freeing the data as side data is exported.

Micro bump so that API users can detect the bug fix.

6 years agox86/sbrdsp: sign extend start and end gprs in ff_sbr_hf_gen_sse
James Almer [Fri, 30 Jun 2017 01:51:04 +0000 (22:51 -0300)]
x86/sbrdsp: sign extend start and end gprs in ff_sbr_hf_gen_sse

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/hevc_ps: Fix integer overflow with beta/tc offsets
Michael Niedermayer [Fri, 30 Jun 2017 14:23:32 +0000 (16:23 +0200)]
avcodec/hevc_ps: Fix integer overflow with beta/tc offsets

Fixes: runtime error: signed integer overflow: 2113929216 * 2 cannot be represented in type 'int'
Fixes: 2422/clusterfuzz-testcase-minimized-5242114713583616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolibavformat/avformat.h: Move docs inside of #if
Max Weber [Fri, 30 Jun 2017 05:58:41 +0000 (23:58 -0600)]
libavformat/avformat.h: Move docs inside of #if

Otherwise AVTimebaseSource gets av_apply_bitstream_filters' documentation in doxygen.

Signed-off-by: Max Weber <mii7303@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter/vf_geq: >8 bps support
Michael Niedermayer [Fri, 30 Jun 2017 10:16:04 +0000 (12:16 +0200)]
avfilter/vf_geq: >8 bps support

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/interplayvideo: Check ff_get_buffer() for failure
Michael Niedermayer [Fri, 30 Jun 2017 01:31:54 +0000 (03:31 +0200)]
avcodec/interplayvideo: Check ff_get_buffer() for failure

Fixes: runtime error: division by zero
Fixes: 2408/clusterfuzz-testcase-minimized-5432734438653952
Fixes: 2415/clusterfuzz-testcase-minimized-4672827619803136
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agofate: Add fate-copy-trac3074
Michael Niedermayer [Thu, 29 Jun 2017 22:40:17 +0000 (00:40 +0200)]
fate: Add fate-copy-trac3074

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavu/cpu: disable MMX warning on non x86 platforms
Clément Bœsch [Wed, 28 Jun 2017 13:20:45 +0000 (15:20 +0200)]
lavu/cpu: disable MMX warning on non x86 platforms

We have AV_CPU_FLAG_ARMV8 == AV_CPU_FLAG_SSE3 which causes a trigger of
this MMX warning on AArch64.

6 years agoavcodec/interplayvideo: fix regression causing artifacts
Paul B Mahol [Thu, 29 Jun 2017 14:42:14 +0000 (16:42 +0200)]
avcodec/interplayvideo: fix regression causing artifacts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/gdv: add decompression for 2 and 5 method
Paul B Mahol [Wed, 28 Jun 2017 17:24:29 +0000 (19:24 +0200)]
avcodec/gdv: add decompression for 2 and 5 method

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoUpdate mp4 object type for VP9
KongQun Yang [Wed, 28 Jun 2017 21:47:34 +0000 (14:47 -0700)]
Update mp4 object type for VP9

Updated to the standard value 0xB1 defined in mp4ra.org.

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/cfhd: Fix invalid left shift of negative value
Michael Niedermayer [Wed, 28 Jun 2017 18:47:59 +0000 (20:47 +0200)]
avcodec/cfhd: Fix invalid left shift of negative value

Fixes: runtime error: left shift of negative value -1
Fixes: 2395/clusterfuzz-testcase-minimized-6540529313513472
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/vb: Check vertical GMC component before multiply
Michael Niedermayer [Wed, 28 Jun 2017 18:29:02 +0000 (20:29 +0200)]
avcodec/vb: Check vertical GMC component before multiply

Fixes: runtime error: signed integer overflow: 8224 * 663584 cannot be represented in type 'int'
Fixes: 2393/clusterfuzz-testcase-minimized-6128334993883136
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/interplayvideo: use correct context when checking for enough bytes
Paul B Mahol [Wed, 28 Jun 2017 17:35:57 +0000 (19:35 +0200)]
avcodec/interplayvideo: use correct context when checking for enough bytes

Fixes #6502.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/x86: use new x86-64 functions for -idct simple
James Darnley [Mon, 19 Jun 2017 12:55:53 +0000 (14:55 +0200)]
avcodec/x86: use new x86-64 functions for -idct simple

They now match according to FATE, barring any further bugs with untested
parts

7 years agoavcodec/x86: add an 8-bit simple IDCT function based on the x86-64 high depth functions
James Darnley [Fri, 2 Jun 2017 13:20:19 +0000 (15:20 +0200)]
avcodec/x86: add an 8-bit simple IDCT function based on the x86-64 high depth functions

Includes add/put functions

Rounding contributed by Ronald S. Bultje

7 years agoavcodec/x86: allow future 8-bit simple idct to have "DC only hack"
James Darnley [Wed, 14 Jun 2017 22:35:44 +0000 (00:35 +0200)]
avcodec/x86: allow future 8-bit simple idct to have "DC only hack"

Created by Ronald S. Bultje

7 years agoavcodec/interplayvideo: return void
Paul B Mahol [Wed, 28 Jun 2017 15:18:13 +0000 (17:18 +0200)]
avcodec/interplayvideo: return void

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/interplayvideo: fix dead-lock
Paul B Mahol [Wed, 28 Jun 2017 15:14:30 +0000 (17:14 +0200)]
avcodec/interplayvideo: fix dead-lock

Fixes #6499.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/interplayvideo: use int16_t instead of short
Paul B Mahol [Wed, 28 Jun 2017 15:07:49 +0000 (17:07 +0200)]
avcodec/interplayvideo: use int16_t instead of short

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/interplayvideo: check that video_size is >0
Paul B Mahol [Wed, 28 Jun 2017 14:59:59 +0000 (16:59 +0200)]
avcodec/interplayvideo: check that video_size is >0

Fixes #6498.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agohevc: Add support for alternative transfer characterics SEI
Vittorio Giovara [Fri, 9 Jun 2017 21:35:22 +0000 (17:35 -0400)]
hevc: Add support for alternative transfer characterics SEI

The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agoavcodec/utvideodec: Factor multiply out of inner loop
Michael Niedermayer [Tue, 27 Jun 2017 19:47:35 +0000 (21:47 +0200)]
avcodec/utvideodec: Factor multiply out of inner loop

0.5% faster loop

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/utvideodec: bswap directly without memcpy
Michael Niedermayer [Tue, 27 Jun 2017 19:47:34 +0000 (21:47 +0200)]
avcodec/utvideodec: bswap directly without memcpy

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/utvideodec: enable unchecked bitreader
Michael Niedermayer [Tue, 27 Jun 2017 19:47:33 +0000 (21:47 +0200)]
avcodec/utvideodec: enable unchecked bitreader

inner reader loop becomes 16% faster

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/utvideodec: hardcode vlc bits
Michael Niedermayer [Tue, 27 Jun 2017 19:47:32 +0000 (21:47 +0200)]
avcodec/utvideodec: hardcode vlc bits

2.5% faster vlc decoding

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/utvideodec: Move bitstream end check out of inner loop
Michael Niedermayer [Tue, 27 Jun 2017 19:47:31 +0000 (21:47 +0200)]
avcodec/utvideodec: Move bitstream end check out of inner loop

This is not needed when the buffer is large enough for the worst case of a line

2% faster vlc reading

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavc/aacpsdsp: use ptrdiff_t for stride in hybrid_analysis
Clément Bœsch [Thu, 22 Jun 2017 09:24:13 +0000 (11:24 +0200)]
lavc/aacpsdsp: use ptrdiff_t for stride in hybrid_analysis

7 years agolavc/aarch64: add a few SIMD functions for AAC PS
Clément Bœsch [Thu, 25 May 2017 15:50:52 +0000 (17:50 +0200)]
lavc/aarch64: add a few SIMD functions for AAC PS

☭ tests/checkasm/checkasm --bench --test=aacpsdsp
checkasm: using random seed 3318985180
MMX implied by specified flags
MMX implied by specified flags
NEON:
 - aacpsdsp.add_squares        [OK]
 - aacpsdsp.mul_pair_single    [OK]
 - aacpsdsp.hybrid_analysis    [OK]
 - aacpsdsp.stereo_interpolate [OK]
checkasm: all 5 tests passed
nop: 10.0
ps_add_squares_c: 63221.2
ps_add_squares_neon: 22311.7
ps_hybrid_analysis_c: 2466.6
ps_hybrid_analysis_neon: 1521.9
ps_mul_pair_single_c: 68592.0
ps_mul_pair_single_neon: 17426.6
ps_stereo_interpolate_c: 72344.3
ps_stereo_interpolate_neon: 72308.8
ps_stereo_interpolate_ipdopd_c: 117415.2
ps_stereo_interpolate_ipdopd_neon: 113386.3

7 years agolavc/aacpsdsp: fix a few spaces (cosmetics)
Clément Bœsch [Fri, 2 Jun 2017 14:55:32 +0000 (16:55 +0200)]
lavc/aacpsdsp: fix a few spaces (cosmetics)

7 years agocheckasm: add AAC PS tests
Clément Bœsch [Fri, 2 Jun 2017 08:06:08 +0000 (10:06 +0200)]
checkasm: add AAC PS tests

This includes various fixes and improvements from James Almer.

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agolavc/arm: fix lack of precision in ff_ps_stereo_interpolate_neon
Clément Bœsch [Thu, 22 Jun 2017 09:04:26 +0000 (11:04 +0200)]
lavc/arm: fix lack of precision in ff_ps_stereo_interpolate_neon

The code originally pre-multiply by 2 the steps, causing the running sum
of the h factors to drift away due to the lack of precision. It quickly
causes an inaccuracy > 0.01.

I tried diverse approaches such as multiply by 2.0 (instead of adding
the value itself) without success.

I'm unable to bench the impact of this change, feel free to compare.

This commit fixes the incoming aacpsdsp tests.

Following is an alternative simplified function (matching the incoming
AArch64 code) that may be used:

function ff_ps_stereo_interpolate_neon, export=1
        vld1.32         {q0}, [r2]
        vld1.32         {q1}, [r3]
        ldr             r12, [sp]
        vmov.f32        q8, q0
        vmov.f32        q9, q1
        vzip.32         q8, q0
        vzip.32         q9, q1
1:
        vld1.32         {d4}, [r0,:64]
        vld1.32         {d6}, [r1,:64]
        vadd.f32        q8, q8, q9
        vadd.f32        q0, q0, q1
        vmov.f32        d5, d4
        vmov.f32        d7, d6
        vmul.f32        q2, q2, q8
        vmla.f32        q2, q3, q0
        vst1.32         {d4}, [r0,:64]!
        vst1.32         {d5}, [r1,:64]!
        subs            r12, r12, #1
        bgt             1b
        bx              lr
endfunc