Commit Graph

91497 Commits

Author SHA1 Message Date
Mark Thompson
7ff5310068 hwcontext_opencl: Remove unused variable
Unused since a2613647c4.
2018-06-24 19:37:39 +01:00
Jacob Trimble
b86c5757a2 libavutil/encryption_info: Allow multiple init info.
It is possible for there to be multiple encryption init info structure.
For example, to support multiple key systems or in key rotation.  This
changes the AVEncryptionInitInfo struct to be a linked list so there
can be multiple structs without breaking ABI.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-23 01:06:29 +02:00
Hans Carlson
a790813739 ffmpeg: Treat subtitles like audio and video for non-monotonic dts.
Fixes ticket #4450.
Fixes ticket #6248.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-23 01:06:29 +02:00
Michael Niedermayer
540e8c2d64 avcodec/mjpegdec: Check for end of bitstream in ljpeg_decode_rgb_scan()
Fixes: Timeout
Fixes: 8648/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5108395525799936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-23 01:06:29 +02:00
Michael Niedermayer
a734ff4b0e libavcodec/ffv1enc: minor cosmetic fix
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-23 01:06:29 +02:00
Carl Eugen Hoyos
40b7e60718 lavf/amr: Make the heuristic for auto-detection even stricter.
Fixes ticket #7270.
2018-06-22 00:08:13 +02:00
Carl Eugen Hoyos
061e326b60 lavc/dpx: Support 10-bit packing method b (msbpad). 2018-06-21 17:41:48 +02:00
Carl Eugen Hoyos
af1e70dd66 lavc/dpx: Support 12-bit packing method b (msbpad). 2018-06-21 17:39:51 +02:00
Rostislav Pehlivanov
a2613647c4 hwcontext_opencl: use ff_hwframe_map_replace()
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-06-21 16:34:10 +01:00
Rostislav Pehlivanov
7062e4dbc8 hwcontext_internal: add ff_hwframe_map_replace
Used to fix unmapping when no direct interop exists between APIs.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-06-21 16:34:06 +01:00
Gyan Doshi
deb9a04d54 avformat/movenc: allow hdlr name field to be empty
Both QTFF and the ISOBMFF standards allow it.

Fixes #7262
2018-06-21 11:33:00 +05:30
Ruiling Song
649d7ca477 lavfi: make vf_colorspace use functions from colorspace.c
These functions are shared among colorspace related filters.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:25 +01:00
Ruiling Song
8b8b0e2cd2 lavfi: add opencl tonemap filter
This filter does HDR(HDR10/HLG) to SDR conversion with tone-mapping.

An example command to use this filter with vaapi codecs:
FFMPEG -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device \
opencl=ocl@va -hwaccel vaapi -hwaccel_device va -hwaccel_output_format \
vaapi -i INPUT -filter_hw_device ocl -filter_complex \
'[0:v]hwmap,tonemap_opencl=t=bt2020:tonemap=linear:format=p010[x1]; \
[x1]hwmap=derive_device=vaapi:reverse=1' -c:v hevc_vaapi -profile 2 OUTPUT

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:18 +01:00
Danil Iashchenko
714da1fd89 lavfi: Add boxblur_opencl filter
Behaves like existing boxblur filter.
2018-06-21 00:31:42 +01:00
Marton Balint
e8050aa791 ffplay: ignore keypress events before a window is created
Current ffplay code assumes that the read thread is in its main loop before any
key events are captured, but apparently on IOS even keypresses without a window
are forwared.

Fixes ticket #7252.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-20 22:26:41 +02:00
Marton Balint
b1e0e21646 avcodec/libzvbi-teletextdec: propagate ERASE_PAGE flag for repeated subtitle page headers
This works around a libzvbi bug (a corner case in the teletext spec):

https://sourceforge.net/p/zapping/bugs/203/
https://sourceforge.net/p/zapping/patches/20/

Fixes samples/ffmpeg-bugs/trac/ticket2086/RBT_20100801_1835.ts.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-20 22:26:41 +02:00
Carl Eugen Hoyos
a990184007 lavf/mov: Do not fail hard for truncated stsz atoms.
Fixes ticket #6433.
2018-06-19 22:48:04 +02:00
Gyan Doshi
830695be36 avformat/movenc: read track title from correct key
da9cc22d5b allowed the MOV muxer to relay a custom stream handler name,
whether populated from the input stream or user-set. However, the entry
key didn't match the key set by the MOV demuxer, so it wasn't
effective. Fixed.

Due to the change, four FATE refs have to be updated. Verified that the
target payload of the tests hasn't changed in terms of CRC.
2018-06-19 11:05:57 +05:30
Gyan Doshi
f27b02621d avcodec/libx265: apply lavc maxrate, bufsize & rc_init_occupancy
CLI options -maxrate, -bufsize and -rc_init_occupancy can now be picked
up by the x265 wrapper.  Min. rc init has to be 1001 to avoid x265
setting it to vbv-bufsize.
2018-06-19 10:25:04 +05:30
Lou Logan
98e18910a3 avdevice/v4l2enc: add video4linux2 name alias
Makes the v4l2 outdev name consistent with the v4l2 indev name.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-06-18 16:26:23 -08:00
Aman Gupta
cd86c5dbcc avformat/mpegts: parse large PMTs with multiple tables
In 9152c1e495, the mpegts parser was taught how to parse
PMT sections which contained multiple tables. That commit
fixed parsing of PMT packets from some cable providers,
which included a special SCTE table (0xc0) before the
standard program map table (0x2).

Sometimes, however, the combined 0xc0 and 0x2 tables are
larger than a single TS packet (188 bytes). The mpegts parser
already attempts to parse sections which span multiple packets,
but still assumed that the split section only contained one
table.

This patch fixes parsing of such a sample[1].

Before:

    Input #0, mpegts, from 'combined-pmt-tids-split.ts':
      Duration: 00:00:01.26, start: 39188.931756, bitrate: 597 kb/s
      Program 1
      No Program
        Stream #0:0[0xeff]: Audio: ac3, 48000 Hz, mono, fltp, 64 kb/s
        Stream #0:1[0xefd]: Audio: mp3, 0 channels, fltp
        Stream #0:2[0xefe]: Unknown: none

After:

    Input #0, mpegts, from 'combined-pmt-tids-split.ts':
      Duration: 00:00:01.27, start: 39188.931756, bitrate: 589 kb/s
      Program 1
        Stream #0:0[0xefd]: Video: h264 ([27][0][0][0] / 0x001B), none, 59.94 fps, 59.94 tbr, 90k tbn, 180k tbc
        Stream #0:1[0xefe](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s
        Stream #0:2[0xeff](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, mono, fltp, 64 kb/s
        Stream #0:3[0xf00]: Data: scte_35
        Stream #0:4[0xf01]: Unknown: none (ETV1 / 0x31565445)
        Stream #0:5[0xf02]: Unknown: none (ETV1 / 0x31565445)
        Stream #0:6[0xf03]: Unknown: none ([192][0][0][0] / 0x00C0)

With the patch, the PMT is parsed correctly so the streams are
created in the correct order, are associated with "Program 1",
and their codecs are set correctly.

[1] https://s3.amazonaws.com/tmm1/combined-pmt-tids-split.ts

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-18 12:04:59 -07:00
Aman Gupta
37c2cb6a68 Revert "avcodec/mediacodecdec: wait on first frame after input buffers are full"
@xyz reported a regression on his Sony Xperia Z3 Tablet Compact where
playback would intermittently fail to start, essentially deadlocking in
the decoder. Bisecting narrowed down the issue to this commit, which was
meant as an optimization but is not necessary.

This reverts commit a75bb5496a.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:55:23 -07:00
Thomas Guillem
513e6a30fb avcodec/videotoolboxenc: fix invalid session on iOS
Cf. comment. Restart the VT session when the APP goes from foreground to
background and vice versa.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:48:05 -07:00
Thomas Guillem
9e11d27c25 avcodec/videotoolboxenc: split initialization
Split vtenc_init() into vtenc_init() (VTEncContext initialization) and
vtenc_configure_encoder() (creates the vt session).

This commit will allow to restart the vt session while encoding.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:48:05 -07:00
Thomas Guillem
ce2330bdf8 avcodec/videotoolboxenc: fix mutex/cond leak in error path
The leak could happen when the vtenc_create_encoder() function failed.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:48:05 -07:00
Jerome Borsboom
e85c608a46 avcodec/vc1: remove unused ff_vc1_loop_filter_iblk
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-18 11:57:56 +02:00
Jerome Borsboom
c68f60e80a avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and
ff_vc1_i_loop_filter.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-18 11:56:45 +02:00
Jerome Borsboom
4dc7ff7e10 avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped
Simple and Main Profile also need unsigned put_pixels_clamped. Add an argument
to choose between signed and unsigned put_pixels and change function name to
vc1_put_blocks_clamped.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-18 11:55:26 +02:00
Carl Eugen Hoyos
a707a0b657 Revert "avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped"
This reverts commit 2065317db6.

I committed a wrong version of this patch.
Also reverts the follow-up commits 77a3dfb3 and 8331e591.
2018-06-18 11:53:56 +02:00
Danil Iashchenko
b41b6b3234 libavfilter/opencl: Add macro for setting opencl kernel arguments 2018-06-17 17:58:17 +01:00
Jerome Borsboom
89651c82b8 avcodec/vc1: support multi-slice field interlaced pictures with hwaccel
When using hardware accelerated decoding for multi-slice field interlaced pictures,
only the first slice was decoded. This patch adds the neccesary looping over the
remaining slices that may exist in field interlaced pictures. Additionally, we align
the calculation of mby_start for the second field with the method given in VC-1 spec.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-17 16:35:36 +01:00
Jerome Borsboom
3d028b7b72 avcodec/vaapi_vc1: slice_vertical_position starts from zero for the second field
Contrary to VC-1 spec, VAAPI expects the row address of the first
macroblock row in the first slice to start from zero for the second
field in a field interlaced picture.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-17 16:35:30 +01:00
Jun Zhao
bd47cca6a7 fftools/cmdutils: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 10:00:23 +08:00
Jun Zhao
7f5b8f0883 tests/bprint: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
9ba94ac57a avutil/log: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
f7ffb10fb7 lavf/tedcaptionsdec: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
abb28d41ea lavf/icecast: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
483532bc72 lavfi/graphdump: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
9809ac98bd lavfi/af_amerge: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
e4d14b046e lavc/pngdec: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
d0a2ad241c lavc/dvdsubenc: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
df9fe79b3c fftools/ffmpeg_filter: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
24be912827 fftools/ffmpeg: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jerome Borsboom
8331e59133 avcodec/vc1: remove unused ff_vc1_loop_filter_iblk
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:26:14 +02:00
Jerome Borsboom
77a3dfb328 avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and
ff_vc1_i_loop_filter.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:24:54 +02:00
Jerome Borsboom
2065317db6 avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped
Simple and Main profile also need unsigned put_pixels_clamped. Add an argument
to choose between signed and unsigned put_pixels and change function name to
vc1_put_blocks_clamped.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:24:03 +02:00
Jerome Borsboom
a8622497d3 avcodec/vc1: fix overlap and loop filtering for Simple and Main profile
Overlap filtering I and BI frames for Simple and Main profile is only
dependent on PQUANT. Restrict testing for CONDOVER and OVERFLAGS to
advanced profile. Change from mb_width to end_mb_x in ff_vc1_i_loop_filter
to avoid breaking the Microsoft Screen 2 decoder.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:18:48 +02:00
Jerome Borsboom
a43cdd7693 avcodec/vc1: fix overlap smoothing filter for P frames
The v_overlap_filter needs to run on the colocated block of the previous
macroblock. For the luma plane, the colocated block is located two blocks
on the left instead of one. In addition, the overlap filter needs to run
on the non-edge blocks of the first macroblock row and column.

Fixes ticket #7171.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:15:07 +02:00
Carl Eugen Hoyos
07d1c4ae3f lavc/dpx: Allow packed 12-bit little-endian images.
Can be tested with GraphicsMagick.
2018-06-16 16:18:06 +02:00
Gyan Doshi
70742f0264 fate: correct filename references of qt-faststart binary
qt-faststart build doesn't have PROGSSUF added.
2018-06-16 09:20:57 +05:30