Commit Graph

93030 Commits

Author SHA1 Message Date
Paul B Mahol
795af110f7 avcodec: add ARBC decoder
Thanks Kostya for great help in reversing binary.
2019-01-27 13:53:29 +01: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
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
Mark Thompson
25c0ede93b vaapi_encode_h264: Support more complex reference structures 2019-01-23 23:04:11 +00:00
Mark Thompson
494bd8df78 vaapi_encode: Let the reconstructed frame pool be sized dynamically
No supported encode driver requires the pool to be fixed-size, so just
remove this constraint.
2019-01-23 23:04:11 +00:00
Mark Thompson
5fdcf85bbf vaapi_encode: Convert to send/receive API
This attaches the logic of picking the mode of for the next picture to
the output, which simplifies some choices by removing the concept of
the picture for which input is not yet available.  At the same time,
we allow more complex reference structures and track more reference
metadata (particularly the contents of the DPB) for use in the
codec-specific code.

It also adds flags to explicitly track the available features of the
different codecs.  The new structure also allows open-GOP support, so
that is now available for codecs which can do it.
2019-01-23 23:04:11 +00:00
Mark Thompson
26ce3a43a3 vaapi_encode: Allocate picture-private data in generic code 2019-01-23 23:04:11 +00:00
Andreas Rheinhardt
8ca55a2b9e cbs_h2645: Avoid memcpy when splitting fragment #2
Now memcpy can be avoided for NAL units containing escapes, too.

Particularly improves performance for files with hardcoded black bars.
For such a file, time spent in cbs_h2645_split_fragment went down from
369410 decicycles to 327677 decicycles. (It were 379114 decicycles when
every NAL unit was copied.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-01-23 22:33:45 +00:00
Andreas Rheinhardt
992532ee31 h2645_parse: Make ff_h2645_packet_split reference-compatible
This is in preparation for a patch for cbs_h2645. Now the packet's
rbsp_buffer can be owned by an AVBuffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-01-23 22:33:43 +00:00
Carl Eugen Hoyos
cf81284b1c lavc/g723_1enc: Set the default bitrate to 6300. 2019-01-23 23:26:34 +01:00
caohui
ee1c63eb82 lavf/hlsproto: Replace a wrong eol comma with a semicolon. 2019-01-23 23:17:03 +01:00
Lou Logan
d92f06eb66 avformat/img2enc: mention -frames:v in error message
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Kieran O Leary <kieran.o.leary@gmail.com>
2019-01-22 10:59:10 -09:00
Marton Balint
1b126ec408 avformat/concatdec: always re-calculate start time and duration
This allows the underlying files to change their duration on subsequent
avformat context opens.

An example use case where this matters:

ffconcat version 1.0
file dummy.mxf
file dummy.mxf

ffmpeg -re -stream_loop -1 -i dummy.ffconcat -f sdl2 none

The user can seamlessly change the input by atomically replacing dummy.mxf.

v2: Set ConcatFile duration in read_header for all segments with known
durations because from now on we always recalculate the start time in
open_file, and an instant seek could have caused unset ConcatFile durations.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-01-22 20:14:11 +01:00
Marton Balint
679cbd8f18 avformat/concatdec: fix cur_dts based duration calculation with nonzero stream start_time
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-01-22 20:14:11 +01:00
Marton Balint
0a98622cbe avformat/concatdec: factorize the duration calculating function
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-01-22 20:14:11 +01:00
Zhong Li
87c165c237 lavc/qsvenc: set BRCParamMultiplier to aviod BRC overflow
Fix ticket #7663

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-01-22 10:44:39 +08:00
Shiyou Yin
83aa2cd757 avcodec/mips: [loongson] optimize put_hevc_qpel_bi_hv_8 with mmi.
Optimize put_hevc_qpel_bi_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64.
This optimization improved HEVC decoding performance 11.4%(2.01x to 2.24x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-22 00:46:36 +01:00
Shiyou Yin
6d19164811 avcodec/mips: [loongson] optimize put_hevc_qpel_hv_8 with mmi.
Optimize put_hevc_qpel_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64.
This optimization improved HEVC decoding performance 11%(1.81x to 2.01x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-22 00:46:36 +01:00
FeRD (Frank Dana)
8133921ad2 avcodec/tests: Add codec_desc to .gitignore
The compiled libavcodec/tests/codec_desc was left out of that dir's
.gitignore when the test was added, so it shows up in 'git status'
as an untracked file if it's been built.

Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-22 00:40:00 +01:00
Karthick J
306cc26115 avformat/dashenc: Added documentation for $ext$ identifier in filenames 2019-01-21 14:50:34 +05:30
Karthick J
b6d96a6bcc avformat/dashenc: Format xs:datetime in millisecond precision
For low latency streaming even milliseconds matter!
2019-01-21 14:50:23 +05:30
Michael Niedermayer
62f8d27ef1 avcodec/prosumer: Error out if decompress() stops reading data
if 0 is encountered in the LUT then decompress() will continue to output 0 bytes but never read more data.
Without a specification it is impossible to say if this is invalid or a feature.
None of the valid prosumer files tested cause a 0 to be read, so it is likely
not a intended feature.

Fixes: Timeout
Fixes: 11266/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5681827423977472

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-20 21:42:20 +01:00
Michael Niedermayer
f0d48ac41f avcodec/prosumer: Reduce lut size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-20 21:42:20 +01:00
Michael Niedermayer
d3b76c9993 avcodec/prosumer: Simplify code slightly in decompress()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-20 21:42:20 +01:00
Michael Niedermayer
ec28a85107 avcodec/tiff: Check for 12bit gray fax
Fixes: Assertion failure
Fixes: 11898/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5759794191794176

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-20 21:42:20 +01:00
Michael Niedermayer
f64c0dffa1 avutil/imgutils: Optimize memset_bytes() by using av_memcpy_backptr()
This is strongly based on code by Marton Balint, and depends on the previous commit

Fixes: Timeout
Fixes: 11502/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664893810769920
Before: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664893810769920 in 11209 ms
After:  Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664893810769920 in  4104 ms

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-20 21:42:20 +01:00
Michael Niedermayer
12b1338be3 avutil/mem: Optimize fill32() by unrolling and using 64bit
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-20 21:42:20 +01:00
Shiyou Yin
32421602df avcodec/mips: [loongson] optimize put_hevc_pel_bi_pixels_8 with mmi.
Optimize put_hevc_pel_bi_pixels_8 with mmi in the case width=8/16/24/32/48/64.
This optimization improved HEVC decoding performance 2%(1.77x to 1.81x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-20 00:44:02 +01:00
Jun Zhao
32fb83e431 lavc/hls: Cosmetics: Fix indentation for free_segment_list
Commit 673d8cfd51 missed the indent

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2019-01-19 10:13:19 +08:00
Carl Eugen Hoyos
399c8e860f lavu/frame: Fix typo. 2019-01-18 12:34:19 +01:00
Guo, Yejun
aceb9131c1 avcodec/libx264: add support for ROI-based encoding
This patch just enables the path from ffmpeg to libx264,
the more encoders can be added later.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-01-17 21:47:52 +00:00
Guo, Yejun
1ef4828276 avutil: add ROI (Region Of Interest) data struct and bump version
The encoders such as libx264 support different QPs offset for different MBs,
it makes possible for ROI-based encoding. It makes sense to add support
within ffmpeg to generate/accept ROI infos and pass into encoders.

Typical usage: After AVFrame is decoded, a ffmpeg filter or user's code
generates ROI info for that frame, and the encoder finally does the
ROI-based encoding.

The ROI info is maintained as side data of AVFrame.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-01-17 21:47:11 +00:00
James Almer
af05070ddf avfilter/vf_paletteuse: don't constantly free and realloc internal frames
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-01-17 13:24:14 -03:00
Gyan Doshi
f60fdbc960 avfilter/extractplanes: add support for 12-bit YUVA formats
At present, 16-bit auto-scaled format results in incorrect alpha
extraction.
2019-01-17 11:41:18 +01:00
Paul B Mahol
282a471857 avformat/hcom: check probe buffer size 2019-01-16 10:26:53 +01:00
Michael Niedermayer
51978aefe8 avcodec/dirac_arith: Treat overread as error
Fixes: Timeout
Fixes: 11663/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016

Before:Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016 in 26006 ms
After: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016 in 106 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-16 01:29:18 +01:00
Michael Niedermayer
6ed3d0e01c avcodec/diracdec: Propagate errors from dirac_get_arith_uint()
Testcase: 11663/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016

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-16 01:29:18 +01:00