1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

90999 Commits

Author SHA1 Message Date
Paul B Mahol
d122c8b102 avfilter/vf_edgedetect: add canny mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-04 21:34:49 +02:00
Paul B Mahol
aba39cc1f1 avfilter/vf_convolution: add column/vertical mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-04 21:32:26 +02:00
Paul B Mahol
901dc11bb6 avfilter/vf_lut3d: add planar rgb support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-04 21:27:48 +02:00
Aman Gupta
9b563f6584 avcodec/mediacodecdec: add workaround for buggy amlogic mpeg2 decoder
I tested the previous mediacodec changes on seven different Android
TV devices, with both mpeg2 and h264 content. All except one worked
as expected. The exception was the MiBox3 running Android 6.0.1,
where playback would freeze on a frame every few seconds. I tested
two other AMLogic devices with newer Android versions that did not
show the same problem. H264 decoding on the MiBox3 was also not affected,
so this workaround applies only to OMX.amlogic.mpeg2.decoder.awesome
on Android API22.

There is a rumor that Xiaomi is planning to release Android Oreo for
the MiBox3, so I will revisit in a few months to confirm whether this
is specific to os/driver version or the chipset used in that device.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-05-04 11:53:44 -07:00
Aman Gupta
a75bb5496a avcodec/mediacodecdec: wait on first frame after input buffers are full
The output_buffer_count==0 special case is no longer required, and
can cause spurious EAGAIN to surface to the user when input buffers
are filled up. Since the caller now knows if the decoder is accepting
new input (via current_input_buffer>=0), let the wait parameter
control whether we block or not.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-05-04 11:53:41 -07:00
Aman Gupta
f6681feda6 avcodec/mediacodecdec: restructure mediacodec_receive_frame
The new logic follows a recommendation by @rcombs to use
dequeueInputBuffer with a timeout of 0 as a way to detect
whether the codec wants more data. The dequeued buffer index is
kept in MediaCodecDecContext until it can be used next.

A similar technique is also used by the Google's official media
player Exoplayer: see MediaCodecRenderer.feedInputBuffer().

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-05-04 11:53:33 -07:00
Aman Gupta
fe0a6bcbda avcodec/mediacodec_wrapper: add helper to fetch SDK_INT
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-04 11:51:45 -07:00
wm4
7074a7ccd9 avformat: add vapoursynth wrapper
This can "demux" .vpy files. Autodetection of .vpy scripts is
intentionally not done, because it would be a major security issue. You
need to force the format, for example with "-f vapoursynth" for the
FFmpeg CLI tools.

Some minor code copied from other LGPL parts of FFmpeg.

I did not find a good way to test a few of the more obscure VS features,
like VFR nodes, compat pixel formats, or nodes with dynamic size/format
changes. These can be easily implemented on demand.
2018-05-04 17:56:35 +02:00
Sergey Lavrushkin
9479955c62 Adds SRCNN filter.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-05-04 14:24:56 +00:00
Paul B Mahol
4bad76b6e9 avfilter/vf_amplify: add more options for finer filtering
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-04 14:41:38 +02:00
wm4
1d642ebfdb avformat/hls: don't propagate deprecated "user-agent" AVOption
This code will print a warning if any user agent is set - even if the
API user used the proper non-deprecated "user_agent" option.

This change should not even break anything, because even if the user
sets the deprecated "user-agent" option, http.c copies it to the
"user_agent" option anyway.
2018-05-04 14:16:38 +02:00
wm4
022d4a2114 avformat/matroskaenc: do not write timebase as framerate
If the API user doesn't set avg_frame_rate, matroskaenc will write the
current timebase as "default duration" for the video track. This makes
no sense, because the "default duration" implies the framerate of the
video. Since the timebase is forced to 1/1000, this will make the
resulting file claim 1000fps.

Drop it and don't write the element. It's optional, so it's better not
to write it if the framerate is unknown.

Strangely does not require FATE changes.
2018-05-04 14:16:38 +02:00
Michael Niedermayer
dc7a8f7310 avcodec/h263dec: Document padding_bug_score heuristic used for wrong stuffing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-04 02:20:10 +02:00
Haihao Xiang
314994051b 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>
2018-05-03 23:11:23 +01:00
Paul B Mahol
f43fd68f28 avfilter/drawutils: add support for full range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 21:43:57 +02:00
Michael Niedermayer
177133a0f4 avcodec/mpeg4videodec: Split decode_studio_vol_header() out of decode_studiovisualobject()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-03 17:33:51 +02:00
Michael Niedermayer
e03bf251d8 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>
2018-05-03 17:33:51 +02:00
Paul B Mahol
5abcf45d75 avformat/yuv4mpegdec: simplify math
This one actually works with hd1080 y4m files when seeking backwards.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 14:15:07 +02:00
Paul B Mahol
943f7902e6 avfilter/vf_neighbor: add >8 depth suppport
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 12:48:47 +02:00
Paul B Mahol
c8c2fb0977 avfilter/vf_convolution: unbreak roberts filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 11:29:51 +02:00
Paul B Mahol
3a96534ed9 avfilter/vf_convolution: add horizontal/row mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 10:55:10 +02:00
Paul B Mahol
0f0d468fbc 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>
2018-05-03 09:22:28 +02:00
Jan Ekström
bad42e9b40 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.
2018-05-03 10:41:13 +05:30
Jan Ekström
48684d2605 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.
2018-05-03 10:40:32 +05:30
Rodger Combs
6f119dc321 lavf/dashenc: don't call flush_init_segment before avformat_write_header
Fixes crash when muxing MKV-in-DASH
2018-05-03 10:39:39 +05:30
Paul B Mahol
ab1114a0f5 avfilter/vf_convolution: rewrite so it doesn't use temp buffers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 00:09:01 +02:00
Paul B Mahol
6d7c63588c 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>
2018-05-02 23:58:21 +02:00
Tobias Rapp
a150b2e3a0 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>
2018-05-02 08:35:08 +02:00
Mark Thompson
e07b1913fc 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.
2018-05-02 01:21:40 +01:00
Mark Thompson
ddd3a209dc 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.
2018-05-02 01:21:40 +01:00
Mark Thompson
308b989e0c lavc: Add VP9 metadata bitstream filter
Can adjust the colour information.
2018-05-02 01:21:40 +01:00
Mark Thompson
b5df289eb7 lavc: Add coded bitstream read/write support for VP9 2018-05-02 01:21:33 +01:00
Mark Thompson
300ef25314 cbs: Add support for array subscripts in trace output
This makes the trace output for arrays significantly nicer.
2018-05-02 01:20:45 +01:00
Mark Thompson
315cc8c098 cbs_h2645: Simplify representation of fixed values 2018-05-01 23:31:41 +01:00
Mark Thompson
d7786b66bd 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.
2018-05-01 23:31:37 +01:00
Paul B Mahol
d176497cec avfilter/af_biquads: add slice threading
Helps with multi-channels audio. Otherwise use threads=1.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 16:00:19 +02:00
Paul B Mahol
2308a3c7e3 avfilter/af_biquads: change clipping detection from global to channel
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 15:26:20 +02:00
Paul B Mahol
5bfc433a6e avfilter/vf_neighbor: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 15:05:43 +02:00
Paul B Mahol
ddf844d17c avfilter/vf_neighbor: simplify code little
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 14:50:48 +02:00
Paul B Mahol
273edb2fe4 avfilter/vf_neighbor: rewrite without using temp memory
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 13:12:50 +02:00
James Almer
0807a77160 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>
2018-04-30 20:30:02 -03:00
James Almer
65d36473c9 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>
2018-04-30 20:30:01 -03:00
James Almer
e3866ea20d fftools/ffmpeg: fix mixed code and declarations
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-30 18:22:51 -03:00
Marton Balint
649087fa83 avdevice/decklink_dec: unref packets on avpacket_queue_put error
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 22:44:58 +02:00
Marton Balint
75d1529c6e 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>
2018-04-30 22:44:58 +02:00
Marton Balint
7033654f7f 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>
2018-04-30 21:51:31 +02:00
Marton Balint
56b081da57 avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:51:31 +02:00
Marton Balint
4c501bafc0 avcodec/hnm4video: fix palette alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:50:12 +02:00
Marton Balint
e894d958fc avcodec/anm: fix palette alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:50:12 +02:00
Marton Balint
c60a824ee8 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>
2018-04-30 21:50:12 +02:00