Commit Graph

86940 Commits

Author SHA1 Message Date
Derek Buitenhuis b198e09138 af_amix: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:32:03 -04:00
Derek Buitenhuis c27d7c027c rtmpproto: Fix error return
Mistake was added in 5840473890.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:30:57 -04:00
Derek Buitenhuis aa2bc61a3e 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>
2017-07-07 15:29:57 -04:00
Derek Buitenhuis d74ba68acf ffmpeg_opt: Make get_timecode actually return errors
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:27:22 -04:00
Derek Buitenhuis 179bf86fa2 opusdec: Remove dead code
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:26:35 -04:00
Derek Buitenhuis f7daed8545 scpr: Added missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:25:46 -04:00
Derek Buitenhuis 704b774ae0 af_tempo: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:24:49 -04:00
Derek Buitenhuis b603ef0870 bitpacked: Remove dead store
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:23:58 -04:00
Tobias Rapp 8bf9572e9a 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>
2017-07-07 11:57:39 -04:00
DongHoon Kang db8f615d68 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>
2017-07-07 12:01:00 +02:00
Muhammad Faiz 1af615683e 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>
2017-07-07 09:41:52 +07:00
Derek Buitenhuis 2d417076a2 avformat/hlsenc: Add missing error check
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 10:08:18 +08:00
Steven Liu 23e21130bb 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>
2017-07-07 10:05:54 +08:00
Wan-Teh Chang dc11a467e6 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>
2017-07-07 03:48:56 +02:00
Rafaël Carré 3b9cf943c9 h264dec: remove unneeded prototype
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-07 03:48:56 +02:00
Derek Buitenhuis fde9013ab4 mpegtsenc: Don't pass NULL to memcpy
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-06 21:28:20 -04:00
Ricardo Constantino 3b3501f75c 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>
2017-07-06 15:39:10 -04:00
Derek Buitenhuis 99c68861f9 concatdec: Do not pass NULL to memcmp
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-06 15:35:32 -04:00
wm4 f605b56ad9 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.)
2017-07-06 10:04:55 +02:00
Michael Niedermayer f1baafac71 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>
2017-07-06 03:59:09 +02:00
Azamat H. Hackimov 121ab69c9d 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>
2017-07-05 23:25:58 +02:00
John Stebbins 369a3e111c 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 84ab1cc437)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-05 15:55:25 -04:00
John Stebbins 974d508e57 movenc: write correct format hvcc when tag is hvc1
(cherry picked from commit 1ea9b7fdf9)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-05 15:55:25 -04:00
John Stebbins 38d808d72e movenc: move tags definitions to where they are used
(cherry picked from commit 1c64bae648)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-05 15:55:25 -04:00
John Stebbins e199d90da6 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 f6f86f432f)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-05 15:55:25 -04:00
James Almer 9878935927 fate: add fate-checkasm-sbrdsp target
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-05 16:54:16 -03:00
James Almer 9d5e81d3b1 Revert "x86/sbrdsp: remove unnecessary sign extend instruction in apply_noise_main"
This reverts commit 24bb7db403.

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.
2017-07-05 10:29:15 -03:00
Steven Liu 1fe40e73a6 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>
2017-07-05 11:20:21 +08:00
Steven Liu d01b8f8683 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>
2017-07-05 11:15:20 +08:00
Michael Niedermayer c8cfbc6629 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>
2017-07-05 04:37:57 +02:00
James Almer 24bb7db403 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>
2017-07-04 23:36:17 -03:00
James Almer 3d3243577c 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>
2017-07-04 23:02:57 -03:00
James Almer bcbe9e4447 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>
2017-07-04 23:02:24 -03:00
James Almer 440285474b 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>
2017-07-04 22:49:45 -03:00
Michael Niedermayer c07af72098 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>
2017-07-05 03:19:27 +02:00
Michael Niedermayer 7592d97f10 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>
2017-07-05 03:19:27 +02:00
John Stebbins 95f3c85976 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 713efb2c0d)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-04 15:49:34 -04:00
Martin Storsjö d086e40459 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 61f589e31e)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-04 15:47:10 -04:00
Kevin Mark d32a6c36e4 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>
2017-07-04 15:09:10 +02:00
Paul B Mahol 1212041c91 avfilter/vf_ssim: use unsigned so result can be properly stored
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-04 10:21:14 +02:00
Paul B Mahol cbbd330abc avcodec/alsdec: fix some undefined shifts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-04 09:24:54 +02:00
Paul B Mahol c3f10ea4bb avcodec/alsdec: remove unused header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-04 09:20:48 +02:00
Aman Gupta aad79e4323 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>
2017-07-03 23:39:06 +02:00
Aman Gupta 6d4a686d45 lavc/mediacodec: add missing newline on warning
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-07-03 23:38:06 +02:00
Matthieu Bouron 0a24d7ca83 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
2017-07-03 14:29:22 +02:00
Matthieu Bouron 7864e07f4a checkasm: add sbrdsp tests 2017-07-03 14:28:17 +02:00
Steven Liu 274bd1670b 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>
2017-07-03 20:20:44 +08:00
wm4 64ecb78b71 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.
2017-07-03 12:56:32 +02:00
Paul B Mahol c8853568b1 avcodec/alsdec: call correct function for multi-channel coding
Fixes #5942.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-02 16:45:15 +02:00
Kostya Shishkov 06a66e7d94 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>
2017-07-01 21:42:12 +02:00