Commit Graph

90825 Commits

Author SHA1 Message Date
Bela Bodecs
37d0213968 avformat/utils: Stream specifier enhancement
Currently when specifying the program id you can only decide to select
all stream of the specified program (e.g. p:103 will select all streams
of program 103) or narrow the selection to a specific stream sub index
(e.g. p:145:1 will select 2nd stream of program 145.) But you can not
specify like all audio streams of program 145 or 3rd video stream of
program 311.
In some case, mainly working with multiprogram mpeg-ts containers as
input, this feature would be handy.
This patch makes it possible to narrow the stream selection among
streams of the specified program by stream type and optionally its
index. Handled types: a, v, s, d.
Examples: p:601:a  will select all audio streams of program 601,
p:603:a:1 will select 2nd audio streams of program 603,
p:604:v:0 will select first video stream of program 604.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-12 23:52:59 +02:00
Lou Logan
4d544f6086 doc/filters: fix lenscorrection k1 & k2 typo
0 means no correction, not 0.5.

Also document ranges and defaults for options.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-04-12 12:44:49 -08:00
Jun Zhao
52623bc26f lavf/hlsproto: use ff_get_chomp_line
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-12 16:04:58 +08:00
Jun Zhao
f1ccb4dbcf lavf/hlsenc: use ff_get_chomp_line
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-12 16:04:58 +08:00
Jun Zhao
0e49118271 lavf/hls: use ff_get_chomp_line
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-12 16:04:58 +08:00
Jun Zhao
cdd107b965 lavf/aviobuf: add ff_get_chomp_line
Same as ff_get_line but strip the white-space characters in the
string tail.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-12 16:04:58 +08:00
Tobias Rapp
bc62d20dc4 doc: update loglevel option documentation
Updates documentation after the changes to loglevel flag prefix parsing
in 4b736bc921.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-04-12 08:44:03 +02:00
Mattias Amnefelt
a26c9fdd1b libavformat/aac: Parse all ID3 tags present between ADTS frames
Some ADTS streams can have multiple ID3 tags between frames. This
change parses all of them, rather than just the first one.

Signed-off-by: Mattias Amnefelt <mattiasa@avm.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-12 02:54:14 +02:00
Jérôme Martinez
b5788e7025 avcodec/dpx: Support for RGB 12-bit packed decoding
Limited to widths multiple of 8 (RGB) due to lack of test files for such corner case

This partially fixes ticket #5639

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-12 02:54:14 +02:00
Carl Eugen Hoyos
b5c877a554 configure: Disable direct stripping for AIX.
AIX strip doesn't know the option -o.
2018-04-12 02:30:21 +02:00
Aman Gupta
19128408ac avcodec/mpegpicture: fix "stride changed" failures in gray mode
Before adding uvlinesize check, I was seeing failures decoding
some video with ffmpeg compiled with --enable-gray and using AV_CODEC_FLAG_GRAY.

[mpeg2video @ 0x7fa193818c00] get_buffer() failed (stride changed: linesize=1280/1280 uvlinesize=0/640)
[mpeg2video @ 0x7fa193818c00] get_buffer() failed (stride changed: linesize=1280/1280 uvlinesize=0/640)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-11 16:19:46 -07:00
Timo Rothenpieler
2108a6736f avcodec/nvenc: update required driver versions for nvenc 2018-04-11 14:55:28 +02:00
Timo Rothenpieler
86e9dba8fa avcodec/nvenc: add support for B frames as ref 2018-04-11 14:55:28 +02:00
Hendrik Leppkes
3e9d676192 spdifenc: support ac3 core+eac3 dependent streams
Such streams are found on Blu-ray, and identified as EAC3 type in
avformat, while the bitstream of the core stream is actually a pure AC3
frame.

Adjust the parsing accordingly, since AC3 frames always hold 6 blocks
and the numblkscod syntax element is not present.
2018-04-11 11:37:05 +02:00
Bela Bodecs
9825f77ac7 avformat/hlsenc: fix handling of delete_segments when %v is present
When var_stream_map option is used, %v must appear either in segment
name template or in the directory path. This latter case currently is
not handled and delete_segments flag of hls_flags is broken now. This
patch fix this. The root cause of the bug was that HLSSegment struct
only stores the final filename part, but not the final directory path.
Most of the cases, final path info is unneded, It only necessary when
you want to delete old segments (e.g in case of live streaming).
Without variant streams it was unnecessary to store the final directory
path, because all segment were stored into the same directory. But
introducing %v in directory names either require to store the final
directory path into HLSSegment or associate segments with their variant
streams to be able deleting them later. I have choosen the second
solution and introduced a variant index data member into the segment
struct.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2018-04-11 11:15:54 +08:00
Timo Teräs
62c1cfcc35 avformat/movenc: use correct iTunes copyright atom
Support for writing copyright metadata was added in commit bed4fc54c9
for 3GP, MOV and iTunes metadata. 3GP and MOV cases are formally
specified. However, iTunes format does not have specification, and
it seems to have been assumed that it would use the same atom as
MOV (both being Apple formats).

However, Apple uses 'cprt' atom for iTunes metadata (do note that
the iTunes 'cprt' encoding is generic iTunes ItemList atom, not
the 3GP 'cprt' encoding. These are also inside different parent
atoms).

Most references trying to document iTunes atoms mention only
the 'cprt' tag. See:
 - http://atomicparsley.sourceforge.net/mpeg-4files.html
 - http://mutagen.readthedocs.io/en/latest/api/mp4.html

Same applies to other software supporting this tag. Most of them
encode and decode only the 'cprt' atom.

ffmpeg mov demuxer supports both atoms in this context. There are
few pieces of other software that support similarly both 'cprt' and
the incorrect '\251cpy' atom in this context. I believe they do it in
order to read the ffmpeg encoded incorrect copyright atom.

In light of the above this changes the copyright atom to 'cprt' as
it seems to be supported univerally and is the correct atom to use.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-11 02:42:41 +02:00
Matt Wolenetz
e43e97f0e0 lavc/libopusdec: Allow avcodec_open2 to call .close
If there is a decoder initialization failure detected in avcodec_open2
after .init is called, allow graceful decoder .close to prevent leaking
libopus decoder allocations.

BUG=828526

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-11 02:42:41 +02:00
James Almer
aea610b0d6 configure: check for INIT_ONCE before enabling w32threads
Should fix compilation wiht some old mingw-w64 builds that
don't seem to define it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-10 20:45:17 -03:00
James Almer
234a5e0831 configure: check that the required header for Linux Perf is available
Should fix compilation on targets like some old Android NDK versions.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-10 20:43:25 -03:00
Alexander Kravchenko
05f1a3face lavc/amfenc: Retain a reference to D3D frames used as input during the encoding process
Fixes ticket #6990.

Tested-by: James Almer <jamrial@gmail.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
2018-04-10 23:59:21 +01:00
Rodger Combs
4c0798578c lavc/videotoolbox: fix failure to decode PAFF
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-04-10 10:24:28 -07:00
Misty De Meo
d64183ea5d Sega FILM: set dts and duration when demuxing
Reviewed-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-10 02:36:11 +02:00
Jun Zhao
3b350528d2 MAINTAINERS: add myself to the general developers list
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-10 02:36:11 +02:00
Gyan Doshi
3fbe4a043c doc/filters: correct range for length in astats filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-10 02:36:11 +02:00
Carl Eugen Hoyos
4d1d7263d8 lavf/segafilmenc: Do not mix variable declaration and code.
Fixes two warnings: ISO C90 forbids mixed declarations and code
2018-04-10 00:50:01 +02:00
Diego Biurrun
8f144d9e3d Drop Windows XP support remnants 2018-04-09 21:58:39 +02:00
wm4
c7ab6aff66 w32pthreads: always use Vista+ API, drop XP support
This removes the XP compatibility code, and switches entirely to SRW
locks, which are available starting at Windows Vista.

This removes CRITICAL_SECTION use, which allows us to add
PTHREAD_MUTEX_INITIALIZER, which will be useful later.

Windows XP is hereby not a supported build target anymore.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2018-04-09 21:58:39 +02:00
Vittorio Giovara
c31f6b1d61 avprobe: Print a user-friendly version of the display matrix
Shift fixed point numbers to be actual decimal numbers.
2018-04-09 16:50:03 +02:00
Vittorio Giovara
cc06f7bd10 libx265: Support tiny video sizes
Where tiny is less than the default CTU size.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2018-04-09 16:50:03 +02:00
Vittorio Giovara
f821b2ea27 avprobe: Support printing strings with empty keys 2018-04-09 16:50:03 +02:00
Meng Wang
3b2fd96048 avcodec/arm/hevcdsp_sao : add NEON optimization for sao
Signed-off-by: Meng Wang <wangmeng.kids@bytedance.com>
Reviewed-by: Shengbin Meng <shengbinmeng@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-09 03:45:15 +02:00
Michael Niedermayer
249aca8f98 avcodec/movtextdec: Check style_start/end
Limits based on 3GPP TS 26.245 V14.0.0
Fixes: Timeout
Fixes: 6377/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOVTEXT_fuzzer-5175929115508736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-09 03:09:08 +02:00
Zhong Li
54307b3531 lavc/qsvdec: set complete_frame flags for progressive picture
Set the flag MFX_BITSTREAM_COMPLETE_FRAME when it is a progressive picture.
This can fix vc1 decoding segment fault issues because can't set the start
code correctly.

See: ./avconv -hwaccel qsv -c:v vc1_qsv -i /fate-suite/vc1/SA00040.vc1
-vf "hwdownload, format=nv12" -f rawvideo /dev/null

v2: fix some h264 interlaced clips regression
a. field_order of some h264 interlaced video (e.g: cama3_vtc_b.avc) is marked as AV_FIELD_UNKNOWN
   in h264_parser.c. This is not a completed frames.
   So only set the MFX_BITSTREAM_COMPLETE_FRAME when it is progressive.
b. some clips have both progressive and interlaced frames (e.g.CAPAMA3_Sand_F.264),
   the parsed field_order maybe changed druing the decoding progress.

This patch has been verified for other codecs(mpeg2/hevc/vp8).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Maxym Dmytrychenko
cca5e4f040 qsv: adding Multi Frame Encode support
Starting from API 1.25 helps to improve performance of the simultaneous
encode, 1:N scenario, like:

./avconv  -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i
~/bbb_sunflower_1080p_60fps_normal.mp4  -vframes 600 -an \
    -filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1];
[s2]scale_qsv=960:540[o2]" \
    -map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f
rawvideo /tmp/3200a.264 \
    -map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f
rawvideo /tmp/1750a.264

Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Zhong Li
29a8ed7663 lavf/qsvvpp: bypass vpp if not needed.
Currently vpp pipeline is always created, even for the unnecessary
cases such as setting the option "vpp_qsv=w=1280:h=720" for an input
with native resolution 1280x720. Thus introduces unnecessary performance
dropping, so bypass vpp if not needed.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Zhong Li
52ed83fa1a lavc/qsvdec: expose frame pic_type and key_frame
Currently pict_type and key_frame are unset.
Add an extra param to fetch the picture type from qsv decoder

The judgement “key frame is equal to IDR frame” only suitable for H264.
For HEVC, all IRAP frames are key frames, and other codecs have no IDR
frame.

Signed-off-by: ChaoX A Liu <chaox.a.liu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Michael Niedermayer
c837918f50 avcodec/aacsbr_fixed: Fix integer overflow in sbr_hf_assemble()
Fixes: runtime error: signed integer overflow: 2052929346 + 204817098 cannot be represented in type 'int'

This was missed in b1bef755f6
Fixes: 5275/clusterfuzz-testcase-minimized-5367635958038528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 23:34:47 +02:00
Carl Eugen Hoyos
916632dfbb lavc/clearvideo: Allow decoding without extradata. 2018-04-07 22:13:20 +02:00
Michael Niedermayer
6cd81d68c5 libavcodec/rv34: error out earlier on missing references
Fixes visual corruption on seeking

Fixes: downloadTest_clip_24M.rmvb

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 19:16:37 +02:00
Michael Niedermayer
6261ef4251 avcodec/get_bits: Document skip_bits_long()
Found-by: Kieran
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 19:16:37 +02:00
James Almer
9703b7d05f avformat/matroskadec: reference the existing data buffer when creating packets
Newly allocated data buffers (wavpack, prores, compressed buffers)
are padded to meet the requirements of AVPacket.

About 10x speed up in matroska_parse_frame().

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-06 21:14:50 -03:00
James Almer
b8e75a2a08 avformat/matroskadec: factor the prores packet parsing code out
Simplifies code in matroska_parse_frame(). This is in preparation for
the following patch.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-06 21:14:50 -03:00
James Almer
a61886650b avformat/matroskadec: use refcounted buffers in EbmlBin
Data in EbmlBin objects is never changed after being read from the
input file (save for two specific cases with encoded CodePrivate), so
using AVBufferRef we can prevent unnecessary copy of data by instead
creating new references to said constant data.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-06 21:14:49 -03:00
Hendrik Schreiber
647fd4b829 swresample/swresample: Fix for seg fault in swr_convert_internal() -> sum2_float during dithering.
Removed +len1 in call to s->mix_2_1_f() as I found no logical explanation for it. After removal, problem was gone.

Signed-off-by: Hendrik Schreiber <hs@tagtraum.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 02:10:45 +02:00
Lou Logan
2f1963eedc doc/developer: remove merge request method of contributing
This seems to confuse Github users into thinking that we may accept pull
requests. We do not accept pull requests.

Sending patches to the ffmpeg-devel mailing list is our preferred method
for users to contribute code.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-04-06 13:24:18 -08:00
Bela Bodecs
e54679b6c1 doc/filters: some more details and modified example to zmq/azmq
Info about default value of bind_address option and its abbreviated
version (b). Example modified to have named instanced filter and to show
its use.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Lou Logan <lou@lrcd.com>
2018-04-05 16:22:04 -08:00
Carl Eugen Hoyos
233f52fd25 lavf/amr: Stricter heuristic for auto-detection.
Fixes ticket #7125.
2018-04-06 00:21:22 +02:00
Josh de Kock
92fe0bf1e8 lavfi,lavd: add gitignore for generated static component lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:08:53 +01:00
Misty De Meo
187ff5a108 Add Sega FILM muxer
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:04:30 +01:00
Martin Vignali
1425114af2 avcodec/prores_ks : do not call estimate_alpha at each quantification step
also remove unused arg in estimate_alpha_plane

Improve quality of Prores 4444 encoding
2018-04-05 22:06:30 +02:00