Commit Graph

91073 Commits

Author SHA1 Message Date
Aman Gupta
cae004cabb doc: fix incorrect reference to xsd_compliant option
reported by Mindless` on IRC
2018-05-12 12:09:20 -07:00
Aman Gupta
7db022e67b avformat/mpegts: reindent after last change
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-12 11:50:16 -07:00
Aman Gupta
9152c1e495 avformat/mpegts: parse sections with multiple tables
Fixes PMT parsing in some mpegts streams which contain
multiple tables within the PMT pid. Previously, the parser
assumed only one table was present in each packet, and discarded
the rest of the section data after attempting to parse the first
table.

A similar issue was documented in the BeyondTV software[1], which
helped me diagnose the same bug in the ffmpeg mpegts demuxer. I also
tried DVBInspector, libdvbpsi's dvbinfo, and tstools' tsinfo to
help debug. The former two properly read PMTs with multiple tables,
whereas the last has the same bug as ffmpeg.

I've created a minimal sample[2] which contains the combined PMT.
Here's what ffmpeg probe shows before and after this patch:

Before:

    Input #0, mpegts, from 'combined-pmt-tids.ts':
      Duration: 00:00:01.08, start: 4932.966167, bitrate: 741 kb/s
      Program 1
      No Program
        Stream #0:0[0xf9d]: Audio: ac3, 48000 Hz, mono, fltp, 96 kb/s
        Stream #0:1[0xf9b]: Audio: mp3, 0 channels, fltp
        Stream #0:2[0xf9c]: Unknown: none

After:

    Input #0, mpegts, from 'combined-pmt-tids.ts':
      Duration: 00:00:01.11, start: 4932.966167, bitrate: 718 kb/s
      Program 1
        Stream #0:0[0xf9b]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
        Stream #0:1[0xf9c](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
        Stream #0:2[0xf9d](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 96 kb/s

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] http://forums.snapstream.com/vb/showpost.php?p=343816&postcount=201
[2] https://s3.amazonaws.com/tmm1/combined-pmt-tids.ts

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-12 11:50:00 -07:00
Aman Gupta
18074b309f avformat/hlsenc: set AVFMT_NODIMENSIONS
Same as previous commit but for mpegts inside HLS.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-12 11:48:46 -07:00
Aman Gupta
6f50be8760 avformat/mpegtsenc: set AVFMT_NODIMENSIONS
This allows remuxing streams from one mpegts container to another,
without requiring avformat_find_stream_info() (or using `ffmpeg
-probesize 32` on the cli).

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-12 11:48:39 -07:00
Paul B Mahol
1c2e5fc454 avfilter/vf_maskedmerge: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-12 15:46:28 +02:00
Paul B Mahol
9b6f8fb25d avfilter/vf_deblock: add timeline support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-12 12:34:02 +02:00
Michael Niedermayer
10ca419dd8 avformat/mxfenc: Set color siting to 0 for D10-MXF
SMPTE 386M (D-10) lists 4 as value to be used
SMPTE 377-1-2009 says
    "The definitions of 00h (coSiting) and 04h (Rec 601) are equivalent. The value of 04h is deprecated. New
     MXF encoders shall use the value of 00h instead."

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-12 01:08:01 +02:00
Michael Niedermayer
d628caf54f avformat/mxfenc: Add Sample width/height/x offset/y offset, Display x offset and F2 offset
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-12 01:08:01 +02:00
Tobias Rapp
66ba303c53 fate: add more tests for hue video filter
Adds tests for the hue angle and brightness filter parameters.
Renames the existing saturation parameter test for consistency.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-05-11 09:16:08 +02:00
Mark Thompson
f995aa82d8 fate/cbs: Add an SEI test
The artificial sample file sei-1.h264 contains five frames (IDR P B I B)
and the following SEI message types:
* Buffering period
* Picture timing
* Pan-scan rectangle (display as 4:3)
* User data registered, containing A/53 closed captions (captions match
  frame content, including reordering)
* Recovery point (at the I frame)
* Display orientation (identity transformation)
* Mastering display (with arbitrary contents)
* Undefined SEI type 1234 (containing ascending bytes)
2018-05-10 23:54:02 +01:00
Mark Thompson
ac687add84 cbs_h264: Add support for mastering display SEI messages 2018-05-10 23:54:01 +01:00
Mark Thompson
d94dda742c cbs_h264: Add support for pan-scan rectangle SEI messages 2018-05-10 23:54:01 +01:00
Mark Thompson
9d375e114a h264_metadata: Fix AUD writing
The aud structure exists on the stack, so the variable was previously
out-of-scope when the unit is written.
2018-05-10 23:53:54 +01:00
Mark Thompson
2b41213500 h264_metadata: Remove redundant setting of SEI payload size
This should be derived from the data length rather than set explicitly.
2018-05-10 22:05:44 +01:00
Mark Thompson
4c9741a1dd cbs_h264: Fix handling of unknown SEI
The user should only interact directly with the data length, not the
payload size.
2018-05-10 22:05:44 +01:00
Carl Eugen Hoyos
6dc79637f3 lavc/qdrw: Read PixMap palette.
Fixes ticket #6195.
2018-05-10 23:03:50 +02:00
Anton Leontiev
9481802539 lavd/v4l2: Add ARGB and XRGB packed pixel formats
Formats ARGB32, XRGB32, ABGR32, and XBGR32 were added to V4L2 instead
of ill-defined deprecated RGB32/BGR32 pixel formats.

When pixel format is not specified explicitly FFmpeg tries formats in
order in which they are stored in the table. Therefore formats are
sorted as follows: BGR is preferred over RGB and XBGR is preferred
over ARGB, because it could give better performance by ignoring alpha
component.
2018-05-10 22:40:57 +02:00
Haihao Xiang
0612e29b59 vaapi_encode_h265: Insert content light level information
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-05-10 20:55:42 +01:00
Haihao Xiang
2943dd35b7 cbs_h265: read/write content light level information SEI message
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-05-10 20:55:42 +01:00
Haihao Xiang
345b6962b6 vaapi_encode_h265: Insert mastering display colour volume
'-sei xxx' is added to control SEI insertion, so far only mastering
display colour volume is available for testing.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-05-10 20:55:32 +01:00
Haihao Xiang
56ed011692 cbs_h265: read/write HEVC PREFIX SEI
Similar to H264, cbs_h265_{read, write}_nal_unit() can handle HEVC
prefix SEI NAL units. Currently mastering display colour volume SEI
message is added only, we may add more SEI message if needed later

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-05-10 20:36:45 +01:00
Haihao Xiang
bed670a1de hwcontext_vaapi: Add an assert in vaapi_map_from_drm()
Every fourcc in vaapi_drm_format_map should be in
vaapi_format_map, so add an assert to ensure we have the right maps.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-05-10 19:52:53 +01:00
Haihao Xiang
7e78801fa5 vaapi_encode: Add an assert in vaapi_encode_truncate_gop()
The flag of input_available must be set when pic_start is not NULL, so
add an assert to ensure it is true. In addition, the assert on last_pic
is unnecessary now, so remove this assert.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2018-05-10 19:52:53 +01:00
Philip Langdale
1261003700 avcodec/nvdec_hevc: fix scaling lists
The main issue here was the use of [i] instead of [i * 3] for the 32x32
matrix. As part of fixing this, I changed the code to match that used
in vdpau_hevc, which I spent a lot of time verifying.

I also changed to calculating NumPocTotalCurr using the existing helper,
which is what vdpau does.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-05-10 18:41:56 +02:00
Timo Rothenpieler
46c1ee1917 avcodec/hevcdec: make ff_hevc_frame_nb_refs take a const pointer 2018-05-10 18:41:56 +02:00
Paul B Mahol
974eb4aaaa avfilter: add fftdnoiz filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-10 14:44:17 +02:00
Jun Zhao
74a7ddd985 lavfi/tests/filtfmts: fix the build warning.
fix the build warning: ignoring return value.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-10 19:28:51 +08:00
Jun Zhao
b30575bc98 checkasm/sw_rgb: fix the function declaration warning
fix the warning: "function declaration isn’t a prototype", in C
int foo() and int foo(void) are different functions. int foo()
accepts an arbitrary number of arguments, while int foo(void) accepts 0
arguments.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-10 19:28:51 +08:00
Jun Zhao
1655e1096e lavf/network: fix doxygen comments.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-10 19:02:53 +08:00
Thomas Mundt
a3a6d4da62 avformat/mxfenc: add h264 profiles
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-10 02:10:12 +02:00
Timo Rothenpieler
1c15d26615 avfilter/vf_hwupload_cuda: update supported pix_fmts 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
ece068a771 avutil/hwcontext_cuda: use generic size and pointer assignment functions 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
41a18982d0 avutil/hwcontext_cuda: add support for nvenc rgb formats 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
93d1756af2 avcodec/cuviddec: explicitly synchronize cuMemcpy calls 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
9b82e333b7 avutil/hwcontext_cuda: explicitly synchronize cuMemcpy calls 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
880236e898 avcodec/nvdec: pass CUstream in vpp parameters 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
c855683427 avutil/hwcontext_cuda: add CUstream in cuda hwctx 2018-05-10 00:34:22 +02:00
Timo Rothenpieler
baabd3c2ad avcodec/nvdec: avoid needless copy of output frame
Replaces the data pointers with the mapped cuvid ones.
Adds buffer_refs to the frame to ensure the needed contexts stay alive
and the cuvid idx stays allocated.
Adds another buffer_ref to unmap the frame when it's unreferenced itself.
2018-05-10 00:34:21 +02:00
Timo Rothenpieler
2e700b082c Revert "avcodec/nvenc: make hw_frames_ctx fully optional"
This reverts commit 7d4e1f7cfb.

Accidentially pushed this with a batch of other patches, and it didn't
seem to break anything, so I went with it.
Except it does, so reverting it it is.
2018-05-10 00:34:21 +02:00
Aman Gupta
07d9c31055 avformat/mpegts: clean up whitespace
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:43:38 -07:00
Aman Gupta
1a14e39145 avformat/mpegts: use MAX_SECTION_SIZE instead of hardcoded value
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:42:28 -07:00
Aman Gupta
2c500f5097 avformat/mpegts: skip non-PMT tids earlier
This mimics the logic flow in all the other callbacks
(pat_cb, sdt_cb, m4sl_cb), and avoids calling skip_identical()
for non PMT_TID packets.

Since skip_identical modifies internal state like
MpegTSSectionFilter.last_ver, this change prevents unnecessary
reprocessing on some streams which contain multiple tables in
the PMT pid. This can be observed with streams from certain US
cable providers, which include both tid=0x2 and another unspecified
tid=0xc0.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:39:55 -07:00
Aman Gupta
12ceaf0fba ffprobe: fix SEGV when new streams are added
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:30:17 -07:00
Aman Gupta
a19bac8fc8 avcodec/hevc: remove videotoolbox hack
No longer required since 63d875772d. The equivalent hack
for h264 was removed in that commit, but this one was missed.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:26:31 -07:00
Aman Gupta
07d175d0b0 avcodec/videotoolbox: split h264/hevc callbacks
Previously the shared callbacks were trying to interpret
avctx->priv_data as H264Context*

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:26:31 -07:00
Aman Gupta
dd77cca1c4 avcodec/videotoolbox: cleanups
No functional changes.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:26:31 -07:00
James Almer
c6a63e1109 avcodec/cbs_h2645: use AVBufferRef to store list of active parameter sets
Removes unnecessary data copies, and partially fixes potential issues
with dangling references held in said lists.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-09 11:14:14 -03:00
Michael Niedermayer
293a6e8332 avformat/mxfenc: Write transfer characteristic
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
c35ca7e01c avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00