Commit Graph

93237 Commits

Author SHA1 Message Date
Steven Liu
1e03d60054 avformat/hlsenc: add var_stream_map LANGUAGE field string parameter
use a:0,agroup:aud_low,default:Yes,language:CHN a:1,agroup:aud_low,language:ENG
        a:2,agroup:aud_high,default:YesYes,language:CHN a:3,agroup:aud_high,language:ENG
        v:0,agroup:aud_low v:1,agroup:aud_high
        create master m3u8 list.

result:
EXTM3U
EXT-X-VERSION:3
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_0",DEFAULT=YES,LANGUAGE="CHN",URI="out_0.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_1",DEFAULT=NO,LANGUAGE="ENG",URI="out_1.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_2",DEFAULT=YES,LANGUAGE="CHN",URI="out_2.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_3",DEFAULT=NO,LANGUAGE="ENG",URI="out_3.m3u8"
EXT-X-STREAM-INF:BANDWIDTH=1170400,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_low"
out_4.m3u8
EXT-X-STREAM-INF:BANDWIDTH=3440800,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_high"
out_5.m3u8

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-01-31 16:17:11 +08:00
Steven Liu
6a25bb5aa4 avformat/hlsenc: add var_stream_map DEFAULT field status parameter
use a:0,agroup:aud_low,default:Yes a:1,agroup:aud_low,
    a:2,agroup:aud_high,default:Yes a:3, agroup:aud_high,
    v:0,agroup:aud_low v:1,agroup:aud_high
    create master m3u8 list.

result:
EXTM3U
EXT-X-VERSION:3
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_0",DEFAULT=YES,URI="out_0.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_1",DEFAULT=NO,URI="out_1.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_2",DEFAULT=YES,URI="out_2.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_3",DEFAULT=NO,URI="out_3.m3u8"
EXT-X-STREAM-INF:BANDWIDTH=1170400,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_low"
out_4.m3u8
EXT-X-STREAM-INF:BANDWIDTH=3440800,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_high"
out_5.m3u8

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-01-31 16:17:02 +08:00
Steven Liu
62e8644bca avformat/hlsenc: make the EXT-X-MEDIA NAME field by stream id.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-01-31 16:16:53 +08:00
Michael Niedermayer
0b50f27635 avformat/rtsp: Clear reply in every iteration in ff_rtsp_connect()
Fixes: Infinite loop

Found-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-31 00:24:38 +01:00
Michael Niedermayer
9f4af97aff avcodec/rasc: Move ff_get_buffer() after frame checks
If the frame1/2 checks fail this avoids doing the allocation of a new frame

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-31 00:24:38 +01:00
Michael Niedermayer
f4079d5174 avcodec/rasc: Check uncompressed dlta size
We assume that if the compressed size is bigger than if each byte is encoded in a single raw packet
that the data is invalid.

Fixes: Out of memory
Fixes: 12208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5648916473708544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-31 00:24:38 +01:00
Michael Niedermayer
db1c4acd02 avcodec/fic: Check that there is input left in fic_decode_block()
Fixes: Timeout
Fixes: 12450/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5661984622641152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-31 00:24:38 +01:00
Michael Niedermayer
b559c58a03 avformat/flvdec: Try to support some concatenated flv files
Fixes: discont.flv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-31 00:24:38 +01:00
Carl Eugen Hoyos
8a23a2b7de lavf/asf: Remove an unneeded forward declaration. 2019-01-30 23:15:28 +01:00
Dilshod Mukhtarov
1100862a94 libavdevice/gdigrab: fix HIDPI support for mouse positioning
Mouse position was not calculated properly in area or window mode

Signed-off-by: Dilshod Mukhtarov <dilshodm@gmail.com>
2019-01-30 21:55:22 +01:00
Dilshod Mukhtarov
d7c9ddd0c4 libavdevice/gdigrab: fix HIDPI support for window capture
In Windows if using scaling other than 100% then the grabbed window was not captured fully (cropped)

Signed-off-by: Dilshod Mukhtarov <dilshodm@gmail.com>
2019-01-30 21:55:11 +01:00
Karthick J
789d3b98d1 avformat/tee : Pass standards compliance value to slave muxers as well 2019-01-30 19:32:34 +01:00
Gyan Doshi
2e2b44baba avformat/http: clarify that ffmpeg will attempt to add missing CRLF 2019-01-29 09:58:30 +05:30
James Almer
286e58bb1f avcodec/arbc: clear decoder state when seeking
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-01-28 18:14:08 -03:00
Marton Balint
483d029188 avcodec/motion_est: remove duplicate function
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-01-28 21:46:58 +01:00
Karthick J
1db30d6cec avformat/dashenc: Skip writing trailer for MP4 output when in streaming mode
In streaming mode mp4 trailer is not required for playout.
2019-01-28 11:07:10 +05:30
Michael Niedermayer
eb1f95eb35 avcodec/rscc: Avoid returning frames that have nearly no undamaged pixels in them
Fixes: Timeout
Fixes: 12192/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6279038004363264

Before: clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6279038004363264 in 15423 ms
After:  clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6279038004363264 in 190 ms

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
Michael Niedermayer
5bcefceec8 avcodec: Add discard_sample_percentage
Suggested-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
Michael Niedermayer
b860f2218a tools/target_dec_fate.list: add entries upto 1214
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
Michael Niedermayer
fcbda8af17 avcodec/huffyuvdec: Check slice_offset/size
Fixes: out of array access
Fixes: 12447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5201623956062208
Fixes: 12458/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5705567736168448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
Michael Niedermayer
4523cc5e75 avcodec/ilbcdec: Fix undefined integer overflow lsf2poly()
The addition is moved up into the context where the variable is unsigned avoiding
the undefined behavior

Fixes: runtime error: signed integer overflow: 2147481972 + 4096 cannot be represented in type 'int'
Fixes: 12444/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5755706244857856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
Michael Niedermayer
c95d0fb239 avcodec/ilbcdec: Fix integer overflow in construct_vector()
webrtc contains explicit code to ignore the undefined behavior (RTC_NO_SANITIZE / OverflowingAddS32S32ToS32())

Probably fixes: Integer overflow (unreproducable here)
Probably fixes: 12215/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5767142427852800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
hwren
3016e1f8c5 MAINTAINERS: add AVS2 section
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-28 01:09:38 +01:00
Mark Thompson
44bcccb7f0 vaapi_encode_h265: Ensure that ref pics are always in the RPS
When making a new P-frame when B-frames are present the previous P-frame
is normally in the DPB because it will be referred to by subsequent
B-frames.  However, this is not true if there are no B-frames, or in edge
cases where a GOP ends with two P-frames.  Fix this by adding the direct
ref pics to the RPS explicitly.

Fixes #7699.

Tested-by: Ullysses A Eoff <ullysses.a.eoff@intel.com>
2019-01-27 17:38:38 +00:00
Carl Eugen Hoyos
d3a6943804 lavf/subviewerdec: Skip leading BOM.
Fixes ticket #7661.
2019-01-27 14:25:53 +01:00
Gyan Doshi
b5b6f6ad59 avfilter/buffersrc: print relevant info when skipping filter reinit
The timestamp of the changed input frame as well as its relevant
properties can be examined by the user. Only applicable when
reinit_filter is disabled on the input stream.
2019-01-27 18:48:36 +05:30
Carl Eugen Hoyos
8a788ff5d6 lavf/cafdec: Do not fail for unknown atoms with negative size.
The specification requires the demuxer to only read the data
atom up to its given size, this is necessary as atoms are
allowed at the end of the file.
This patch duplicates the behaviour of the QuickTime player.
2019-01-27 14:14:59 +01:00
Paul B Mahol
795af110f7 avcodec: add ARBC decoder
Thanks Kostya for great help in reversing binary.
2019-01-27 13:53:29 +01:00
Janne Grunau
156ea66c91 h264/x86: sign extend int stride in deblock functions
Fixes checkasm errors after adding the h264 deblock tests.
2019-01-27 11:16:31 +01:00
Martin Storsjö
eec93e5709 libopenh264dec: Use a newer decoding entry point function
The "new" entry point actually has existed since OpenH264 1.4 in
2015 and is the the recommended decoding entry point.

The name of this function, DecodeFrameNoDelay, is rather backwards
considering that it doesn't return the latest decoded frame immediately,
but actually does proper delaying and reordering of frames.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-01-26 21:13:03 +02:00
Peter Ross
d8ebfd1bdf avcodec/vp6: select idct based (loosely) on number of coefficients decoded
The VP3/4/5/6 reference decoders all use three IDCT versions: one for the
DC-only case, another for blocks with more than 10 coefficients, and an
optimised one for blocks with up to 10 AC coefficents. VP6 relies on the
sparse 10 coefficient version, and without it, IDCT drift occurs.

Fixes: https://trac.ffmpeg.org/ticket/1282

Signed-off-by: Peter Ross <pross@xvid.org>
2019-01-26 23:49:09 +11:00
Peter Ross
160ebe0a8d avcodec/vp6: use ff_vp3dsp_[hv]_loop_filter_12
Partially fixes: https://trac.ffmpeg.org/ticket/1282

Signed-off-by: Peter Ross <pross@xvid.org>
2019-01-26 23:49:04 +11:00
Peter Ross
10a57f55e6 avcodec/vp6: use rounded shift for chroma motion vector calculation
Partially fixes: https://trac.ffmpeg.org/ticket/1282

Signed-off-by: Peter Ross <pross@xvid.org>
2019-01-26 23:48:59 +11:00
Peter Ross
f4756ee9f7 avcodec/vp3dsp: add 10 coefficient version of the VP3 IDCT
This version of the IDCT is used by the VP6 decoder.

Signed-off-by: Peter Ross <pross@xvid.org>
2019-01-26 23:48:50 +11:00
Peter Ross
19565c6026 avcodec/vp3dsp: add 12 pixel loop filter functions
Signed-off-by: Peter Ross <pross@xvid.org>
2019-01-26 23:48:43 +11:00
Peter Ross
1dfd7aecf2 avcodec/vp3dsp: move vp3 init loop filter function to vp3dsp
This is also used by the VP6 decoder.

Signed-off-by: Peter Ross <pross@xvid.org>
2019-01-26 23:48:34 +11:00
Janne Grunau
28a8b5413b h264/aarch64: add intra loop filter neon asm
Add my neon asm from x264 relicensed under the LGPL 2.1 or later. Ported
(x264 uses nv12 chroma) and optimized.

Cycle count for checkasm --bench on a Snapdragon 820e:
h264_h_loop_filter_luma_intra_8bpp_c: 60.0
h264_h_loop_filter_luma_intra_8bpp_neon: 54.2
h264_v_loop_filter_luma_intra_8bpp_c: 148.3
h264_v_loop_filter_luma_intra_8bpp_neon: 73.8
h264_h_loop_filter_chroma_intra_8bpp_c: 27.8
h264_h_loop_filter_chroma_intra_8bpp_neon: 21.4
h264_h_loop_filter_chroma_mbaff_intra_8bpp_c: 15.8
h264_h_loop_filter_chroma_mbaff_intra_8bpp_neon: 15.7
h264_v_loop_filter_chroma_intra_8bpp_c: 45.8
h264_v_loop_filter_chroma_intra_8bpp_neon: 17.3
2019-01-26 12:05:10 +01:00
Janne Grunau
846c3d6aca h264/aarch64: optimize neon loop filter
Exit as soon as possible if no filtering will be done.

Improves the checkasm --bench cycle count on a Snapdragon 820e:
h264_h_loop_filter_luma_8bpp_c:      72.4 ->  72.5
h264_h_loop_filter_luma_8bpp_neon:   97.1 ->  56.3
h264_v_loop_filter_luma_8bpp_c:     174.0 -> 173.5
h264_v_loop_filter_luma_8bpp_neon:   62.9 ->  60.9
h264_h_loop_filter_chroma_8bpp_c:    30.2 ->  30.3
h264_h_loop_filter_chroma_8bpp_neon: 51.6 ->  25.7
h264_v_loop_filter_chroma_8bpp_c:    57.3 ->  57.3
h264_v_loop_filter_chroma_8bpp_neon: 28.0 ->  24.0
2019-01-26 12:05:10 +01:00
Janne Grunau
d7f4f5c4a1 checkasm/h264: add loop filter tests 2019-01-26 12:05:10 +01:00
Janne Grunau
bb515e3a73 h264/aarch64: sign extend int stride in loop filter asm 2019-01-26 12:05:10 +01:00
Martin Storsjö
41cf3e3b1c arm: Create proper .rdata sections for COFF
As .rodata isn't one of the default created sections for COFF, it was
created as a read-write data section. By using the default .rdata
section name for COFF, it automatically becomes a read-only data section.
The existing ".section .rodata" works as intended for ELF though.

This is based on an original patch and diagnose by Tom Tan
<Tom.Tan@microsoft.com>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-01-25 23:53:37 +02:00
Zhong Li
260f1960e7 lavf/vaapi_deinterlace: return error if mode unsupported
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Fuwei Tang <fuweix.tang@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-01-25 16:55:01 +08:00
Zhong Li
74cf2dc3ac lavc/qsvenc: enable QVBR mode
QVBR mode is to use the variable bitrate control algorithm
with constant quality.
mfxExtCodingOption3 should be supported to enable QVBR mode.

It is neccesary to specify a max_rate for QVBR, else it may be ICQ mode.
Example usage: ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -c:v
h264_qsv -global_quality 25 -maxrate 2M test_qvbr.mp4 -v verbose

Clip QVBR quality range to be [0, 51] as Mark's commments.
It is similar to qp range of CQP but possibly should be updated when VP8/VP9
encoding can be supported.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-01-25 16:53:27 +08:00
Gyan Doshi
3224d6691c avfilter/afade+acrossfade: allow skipping fade on inputs
New fade curve value 'nofade' passes audio samples as-is.
Primarily useful in carrying out acrossfade without fades.
2019-01-24 22:08:34 +05:30
Guo, Yejun
e0ad7d5741 avcodec/libx265: add support for ROI-based encoding
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-01-24 15:07:07 +00:00
Carl Eugen Hoyos
93b967157d lavf/supenc: Remove some unneeded casts. 2019-01-24 13:08:27 +01:00
Carl Eugen Hoyos
406f8d9c9a lavf/movenc: Mention video_track_timescale as option to fix the timescale.
Smarter improvements for this error message were suggested in the past
but this is certainly an improvement.
2019-01-24 12:52:50 +01:00
Zachary Zhou
b8ebce4f84 libavfilter: add transpose_vaapi filter
Swap width and height when do clock/cclock rotation
Add reversal/hflip/vflip options

ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
-hwaccel_output_format vaapi -i input.264 -vf "transpose_vaapi=clock_flip"
-c:v h264_vaapi output.h264

Signed-off-by: Zachary Zhou <zachary.zhou@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2019-01-23 23:29:40 +00:00
Mark Thompson
916b3b9079 vaapi_encode_vp9: Support more complex reference structures 2019-01-23 23:04:12 +00:00
Mark Thompson
362992e94b vaapi_encode_h265: Support more complex reference structures
The reference picture sets are now constructed directly from the DPB
information.
2019-01-23 23:04:11 +00:00