]> git.sesse.net Git - ffmpeg/log
ffmpeg
6 years agoopusenc: use for loops with declarations
Rostislav Pehlivanov [Fri, 18 May 2018 01:38:08 +0000 (02:38 +0100)]
opusenc: use for loops with declarations

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agodoc/developer: update style guidelines to include for loops with declarations
Rostislav Pehlivanov [Fri, 18 May 2018 01:24:28 +0000 (02:24 +0100)]
doc/developer: update style guidelines to include for loops with declarations

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoconfigure: error out on unsupported MSVC versions
Rostislav Pehlivanov [Mon, 14 May 2018 23:53:26 +0000 (00:53 +0100)]
configure: error out on unsupported MSVC versions

The FATE tests for MSVC versions older than 2013 are untested in FATE
and apparently are no longer supported.

This commit makes the configure process error out in case an older version
is used, and suggests to use a supported version of MSVC to compile.

This also changes the documentation to reflect this.

As discussed on IRC:

2018-05-12 19:45:16     jamrial then again, most of those were for old msvc, and i think we're not supporting versions older than 2013 (first one c99 compliant) anymore
2018-05-12 19:45:43     +JEEB   yea, I think 2013 update 2 is needed

22:53 <@atomnuker> nevcairiel: which commit broke/unsupported support for msvc 2013?
23:23 <@atomnuker> okay, it was JEEB
23:25 <+JEEB> which was for 2012 and older
23:25 <+JEEB> and IIRC we no longer test those in FATE so that was my assumption
23:26 <+JEEB> 2013 is when MS got trolled enough to actually update their C part
23:26 <+JEEB> aand actually advertised FFmpeg support
23:26 <+JEEB> (although it was semi-failing until VS2013 update 1 or 2)

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoavformat/mpegts: tag video streams with still images
Aman Gupta [Tue, 15 May 2018 18:26:07 +0000 (11:26 -0700)]
avformat/mpegts: tag video streams with still images

Parses the video_stream_descriptor (H.222 2.6.2) to look
for the still_picture_flag. This is exposed to the user
via a new AV_DISPOSITION_STILL_IMAGE.

See for example https://tmm1.s3.amazonaws.com/music-choice.ts,
whose video stream only updates every ~6 seconds.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat: add skip_estimate_duration_from_pts
Aman Gupta [Tue, 15 May 2018 22:56:45 +0000 (15:56 -0700)]
avformat: add skip_estimate_duration_from_pts

For seekable mpegts streams, duration is calculated from
pts by seeking to the end of the file for a pts and subtracting
the initial pts to compute a duration.

This can be expensive in terms of added latency during
probe, especially when streaming over a network. This new
option lets you skip the duration calculation, which is useful
when you don't care about the value and want to save some overhead.

This patch is particularly useful when dealing with live mpegts
streams. Normally such streams are not seekable, so durations
are not calculated. However in my case I am dealing with a seekable
live mpegts stream (networked access to a .ts file which is still
being appended to).

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agolavc/v210dec: Skip Canopus C210 extradata.
Carl Eugen Hoyos [Thu, 10 May 2018 20:45:07 +0000 (22:45 +0200)]
lavc/v210dec: Skip Canopus C210 extradata.

Unbreaks files with unknown extradata, the Canopus decoder accepts both files
with and without this extradata (24 byte "INFO", 16 byte "RDRT", rest "FIEL").

Reported-by: Peter Bubestinger
Tested-by: Piotr Bandurski
6 years agoavcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0
Michael Niedermayer [Sun, 13 May 2018 22:10:33 +0000 (00:10 +0200)]
avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0

Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int');
Fixes: 6500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-4523620274536448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/fic: Check available input space for cursor
Michael Niedermayer [Sat, 5 May 2018 20:00:01 +0000 (22:00 +0200)]
avcodec/fic: Check available input space for cursor

Fixes: out of array read
Fixes: 6546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-6317064647081984
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/fic: Avoid some magic numbers related to cursors
Michael Niedermayer [Sat, 5 May 2018 21:42:36 +0000 (23:42 +0200)]
avcodec/fic: Avoid some magic numbers related to cursors

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/mpeg4video: Detect reference studio streams as studio streams
Michael Niedermayer [Sun, 29 Apr 2018 21:39:41 +0000 (23:39 +0200)]
avcodec/mpeg4video: Detect reference studio streams as studio streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/mpeg4videodec: Check bps (VOL header) before VOP for studio profile
Michael Niedermayer [Sun, 29 Apr 2018 18:28:46 +0000 (20:28 +0200)]
avcodec/mpeg4videodec: Check bps (VOL header) before VOP for studio profile

Fixes: runtime error: shift exponent -1 is negative
Fixes: 7486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4977380939530240
Fixes: runtime error: index 36 out of bounds for type 'const uint8_t [32]'
Fixes: 7566/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6536620682510336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/mpeg4videodec: Do not corrupt bits_per_raw_sample
Michael Niedermayer [Sun, 29 Apr 2018 18:49:21 +0000 (20:49 +0200)]
avcodec/mpeg4videodec: Do not corrupt bits_per_raw_sample

Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/mpeg4videode: Eliminate out of loop VOP startcode reading for studio profile
Michael Niedermayer [Sun, 29 Apr 2018 17:09:05 +0000 (19:09 +0200)]
avcodec/mpeg4videode: Eliminate out of loop VOP startcode reading for studio profile

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/g2meet: ask for sample with overflowing RGB
Michael Niedermayer [Wed, 16 May 2018 20:50:19 +0000 (22:50 +0200)]
avcodec/g2meet: ask for sample with overflowing RGB

Suggested-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/g2meet: Check RGB upper limit
Michael Niedermayer [Fri, 27 Apr 2018 18:16:13 +0000 (20:16 +0200)]
avcodec/g2meet: Check RGB upper limit

Fixes: runtime error: left shift of 1876744317 by 16 places cannot be represented in type 'int'
Fixes: 6799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5115274731716608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/xwddec: fix palette alpha
Marton Balint [Sun, 6 May 2018 16:18:19 +0000 (18:18 +0200)]
avcodec/xwddec: fix palette alpha

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavformat/hls: fix seeking around EVENT playlist after media sequence changes
Aman Gupta [Tue, 24 Apr 2018 00:30:21 +0000 (17:30 -0700)]
avformat/hls: fix seeking around EVENT playlist after media sequence changes

The seek functions use first_timestamp, so keep that up to date as
old segments drop off the playlist.

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agolavc/h2645_parse: add h264_nal_unit_name for h264 NAL type.
Jun Zhao [Fri, 11 May 2018 02:28:32 +0000 (10:28 +0800)]
lavc/h2645_parse: add h264_nal_unit_name for h264 NAL type.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agolavc/h2645_parse: rename the nal_unit_name to hevc_nal_unit_name.
Jun Zhao [Mon, 14 May 2018 06:49:56 +0000 (14:49 +0800)]
lavc/h2645_parse: rename the nal_unit_name to hevc_nal_unit_name.

Rename the nal_unit_name to hevc_nal_unit_name, will add a
h264_nal_unit_name function.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agolavc/h2645_parse: log more HEVC NAL type.
Jun Zhao [Fri, 11 May 2018 02:02:27 +0000 (10:02 +0800)]
lavc/h2645_parse: log more HEVC NAL type.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agoavfilter: add aderivative and aintegral filter
Paul B Mahol [Mon, 14 May 2018 08:07:44 +0000 (10:07 +0200)]
avfilter: add aderivative and aintegral filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec: Disable new iterate API for ossfuzz
Michael Niedermayer [Mon, 14 May 2018 10:43:59 +0000 (12:43 +0200)]
avcodec: Disable new iterate API for ossfuzz

A few days ago ossfuzz stoped testing new FFmpeg as it run out of diskspacee

https://oss-fuzz-build-logs.storage.googleapis.com/index.html

An alternative would be to revert the API.

This changes for example
-rwxr-x--- 1 michael michael 144803654 May 14 12:54 tools/target_dec_ac3_fixed_fuzzer*
to
-rwxr-x--- 1 michael michael  30333852 May 14 12:51 tools/target_dec_ac3_fixed_fuzzer*

Which should massively decrease space requirements

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agodoc/examples: add missing ignore files
Zhao Zhili [Mon, 14 May 2018 12:18:02 +0000 (20:18 +0800)]
doc/examples: add missing ignore files

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoexamples/filtering_video: fix memory leak
Zhao Zhili [Mon, 14 May 2018 12:18:01 +0000 (20:18 +0800)]
examples/filtering_video: fix memory leak

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoexamples/filtering_video: add missing headers
Zhao Zhili [Mon, 14 May 2018 12:18:00 +0000 (20:18 +0800)]
examples/filtering_video: add missing headers

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoexamples/filtering_video: drop an always true condition
Zhao Zhili [Mon, 14 May 2018 12:17:59 +0000 (20:17 +0800)]
examples/filtering_video: drop an always true condition

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavu/Makefile: Fix alignment and ordering
Mark Thompson [Mon, 14 May 2018 21:58:57 +0000 (22:58 +0100)]
lavu/Makefile: Fix alignment and ordering

6 years agohwcontext: Do not call device_init again when deriving an existing device
Mark Thompson [Mon, 14 May 2018 21:58:56 +0000 (22:58 +0100)]
hwcontext: Do not call device_init again when deriving an existing device

The change in 309d660775e2b47af6723a0477c4d753bc0c54f4 to call device_init
when doing derivation missed this case - we should only call it if we
actually made a new device.

6 years agoavutil/hwcontext_cuda: fix YUV420P cuda_get_buffer
Marton Balint [Mon, 14 May 2018 21:24:43 +0000 (23:24 +0200)]
avutil/hwcontext_cuda: fix YUV420P cuda_get_buffer

Regression since ece068a771ac3f725e854c681ecbef08e792addc.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavformat/webm_chunk: always use a static buffer for get_chunk_filename
Marton Balint [Sun, 13 May 2018 20:14:22 +0000 (22:14 +0200)]
avformat/webm_chunk: always use a static buffer for get_chunk_filename

My conversation from AVFormatContext->filename to AVFormatContext->url was
wrong in this case because get_chunk_filename uses filename as an output
buffer, and not as an input buffer.

Fixes ticket #7188.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavformat/mpegts: fix incorrect indentation
Aman Gupta [Tue, 15 May 2018 18:47:30 +0000 (11:47 -0700)]
avformat/mpegts: fix incorrect indentation

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavformat/dashenc: configuring container format options
Vishwanath Dixit [Mon, 7 May 2018 09:58:02 +0000 (15:28 +0530)]
avformat/dashenc: configuring container format options

6 years agoavcodec/h2645_parse: skip NALUs with no content after stripping all the trailing...
James Almer [Mon, 14 May 2018 21:09:32 +0000 (18:09 -0300)]
avcodec/h2645_parse: skip NALUs with no content after stripping all the trailing zeros

The GetBitContext is effectively empty in them.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoconfigure: Mention the dash demuxer in the libxml2 help text.
Carl Eugen Hoyos [Mon, 14 May 2018 19:00:26 +0000 (21:00 +0200)]
configure: Mention the dash demuxer in the libxml2 help text.

6 years agoavformat/mpegts: initialize section_buf to fix valgrind test failure
Aman Gupta [Mon, 14 May 2018 17:24:44 +0000 (10:24 -0700)]
avformat/mpegts: initialize section_buf to fix valgrind test failure

http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-valgrind&time=20180513001958

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavfilter/vf_lut2: add timeline support to tlut2 filter
Paul B Mahol [Mon, 14 May 2018 16:26:16 +0000 (18:26 +0200)]
avfilter/vf_lut2: add timeline support to tlut2 filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_blend: add timeline support to tblend filter
Paul B Mahol [Mon, 14 May 2018 15:58:27 +0000 (17:58 +0200)]
avfilter/vf_blend: add timeline support to tblend filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoconfigure: add pkg-config check for libmysofa
Reino Wijnsma [Mon, 7 May 2018 15:59:43 +0000 (17:59 +0200)]
configure: add pkg-config check for libmysofa

This does require libmysofa with today's latest commit (https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1).
They already had a pkg-config file, but the dependencies weren't setup right. Until now.

6 years agoavfilter/vf_srcnn: use function to get number of threads
Paul B Mahol [Mon, 14 May 2018 14:02:00 +0000 (16:02 +0200)]
avfilter/vf_srcnn: use function to get number of threads

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_amplify: check if array is availabe before using it
Paul B Mahol [Mon, 14 May 2018 14:00:00 +0000 (16:00 +0200)]
avfilter/vf_amplify: check if array is availabe before using it

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoAdd IRC nicknames
Tomas Härdin [Sat, 7 Apr 2018 10:18:00 +0000 (12:18 +0200)]
Add IRC nicknames

6 years agoavformat/dashenc: Add documentation for http method option
Karthick Jeyapal [Mon, 14 May 2018 04:48:13 +0000 (10:18 +0530)]
avformat/dashenc: Add documentation for http method option

6 years agoavcodec/vp3: Check that there will be sufficient input for the coded fragments in...
Michael Niedermayer [Sat, 5 May 2018 18:08:36 +0000 (20:08 +0200)]
avcodec/vp3: Check that there will be sufficient input for the coded fragments in unpack_superblocks()

Fixes: Timeout
Fixes: 6292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4871218218926080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoconfigure: fix configure check for lilv-0
Niklas Haas [Sun, 13 May 2018 15:07:48 +0000 (17:07 +0200)]
configure: fix configure check for lilv-0

This should be included as `<lilv/lilv.h>`, same as is done in af_lv2.c.
Forcing the extra lilv-0 breaks platforms where the include dir is
`/usr/include/lilv/lilv.h` rather than
`/usr/include/lilv-0/lilv/lilv.h`.

The new include path works for both, because the `pkg-config --cflags`
includes `-I/usr/include/lilv-0`.

6 years agodoc: fix incorrect reference to xsd_compliant option
Aman Gupta [Sat, 12 May 2018 19:09:18 +0000 (12:09 -0700)]
doc: fix incorrect reference to xsd_compliant option

reported by Mindless` on IRC

6 years agoavformat/mpegts: reindent after last change
Aman Gupta [Wed, 9 May 2018 21:31:30 +0000 (14:31 -0700)]
avformat/mpegts: reindent after last change

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavformat/mpegts: parse sections with multiple tables
Aman Gupta [Wed, 9 May 2018 21:20:48 +0000 (14:20 -0700)]
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>
6 years agoavformat/hlsenc: set AVFMT_NODIMENSIONS
Aman Gupta [Thu, 10 May 2018 02:22:33 +0000 (19:22 -0700)]
avformat/hlsenc: set AVFMT_NODIMENSIONS

Same as previous commit but for mpegts inside HLS.

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavformat/mpegtsenc: set AVFMT_NODIMENSIONS
Aman Gupta [Thu, 10 May 2018 02:21:10 +0000 (19:21 -0700)]
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>
6 years agoavfilter/vf_maskedmerge: add slice threading
Paul B Mahol [Sat, 12 May 2018 13:46:28 +0000 (15:46 +0200)]
avfilter/vf_maskedmerge: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_deblock: add timeline support
Paul B Mahol [Sat, 12 May 2018 10:34:02 +0000 (12:34 +0200)]
avfilter/vf_deblock: add timeline support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavformat/mxfenc: Set color siting to 0 for D10-MXF
Michael Niedermayer [Fri, 6 Apr 2018 16:09:54 +0000 (18:09 +0200)]
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>
6 years agoavformat/mxfenc: Add Sample width/height/x offset/y offset, Display x offset and...
Michael Niedermayer [Sat, 17 Mar 2018 22:06:13 +0000 (23:06 +0100)]
avformat/mxfenc: Add Sample width/height/x offset/y offset, Display x offset and F2 offset

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agofate: add more tests for hue video filter
Tobias Rapp [Wed, 9 May 2018 09:30:40 +0000 (11:30 +0200)]
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>
6 years agofate/cbs: Add an SEI test
Mark Thompson [Mon, 7 May 2018 22:55:20 +0000 (23:55 +0100)]
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)

6 years agocbs_h264: Add support for mastering display SEI messages
Mark Thompson [Mon, 7 May 2018 22:33:36 +0000 (23:33 +0100)]
cbs_h264: Add support for mastering display SEI messages

6 years agocbs_h264: Add support for pan-scan rectangle SEI messages
Mark Thompson [Mon, 7 May 2018 22:33:08 +0000 (23:33 +0100)]
cbs_h264: Add support for pan-scan rectangle SEI messages

6 years agoh264_metadata: Fix AUD writing
Mark Thompson [Mon, 7 May 2018 22:12:28 +0000 (23:12 +0100)]
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.

6 years agoh264_metadata: Remove redundant setting of SEI payload size
Mark Thompson [Mon, 7 May 2018 22:01:48 +0000 (23:01 +0100)]
h264_metadata: Remove redundant setting of SEI payload size

This should be derived from the data length rather than set explicitly.

6 years agocbs_h264: Fix handling of unknown SEI
Mark Thompson [Mon, 7 May 2018 22:05:52 +0000 (23:05 +0100)]
cbs_h264: Fix handling of unknown SEI

The user should only interact directly with the data length, not the
payload size.

6 years agolavc/qdrw: Read PixMap palette.
Carl Eugen Hoyos [Sat, 5 May 2018 00:24:15 +0000 (02:24 +0200)]
lavc/qdrw: Read PixMap palette.

Fixes ticket #6195.

6 years agolavd/v4l2: Add ARGB and XRGB packed pixel formats
Anton Leontiev [Thu, 10 May 2018 15:31:20 +0000 (18:31 +0300)]
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.

6 years agovaapi_encode_h265: Insert content light level information
Haihao Xiang [Thu, 10 May 2018 05:47:47 +0000 (13:47 +0800)]
vaapi_encode_h265: Insert content light level information

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
6 years agocbs_h265: read/write content light level information SEI message
Haihao Xiang [Thu, 10 May 2018 05:47:46 +0000 (13:47 +0800)]
cbs_h265: read/write content light level information SEI message

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
6 years agovaapi_encode_h265: Insert mastering display colour volume
Haihao Xiang [Thu, 10 May 2018 05:47:45 +0000 (13:47 +0800)]
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>
6 years agocbs_h265: read/write HEVC PREFIX SEI
Haihao Xiang [Thu, 10 May 2018 05:47:44 +0000 (13:47 +0800)]
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>
6 years agohwcontext_vaapi: Add an assert in vaapi_map_from_drm()
Haihao Xiang [Thu, 10 May 2018 03:08:23 +0000 (11:08 +0800)]
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>
6 years agovaapi_encode: Add an assert in vaapi_encode_truncate_gop()
Haihao Xiang [Thu, 10 May 2018 03:08:22 +0000 (11:08 +0800)]
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>
6 years agoavcodec/nvdec_hevc: fix scaling lists
Philip Langdale [Thu, 10 May 2018 01:48:59 +0000 (18:48 -0700)]
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>
6 years agoavcodec/hevcdec: make ff_hevc_frame_nb_refs take a const pointer
Timo Rothenpieler [Thu, 10 May 2018 10:22:34 +0000 (12:22 +0200)]
avcodec/hevcdec: make ff_hevc_frame_nb_refs take a const pointer

6 years agoavfilter: add fftdnoiz filter
Paul B Mahol [Sun, 6 May 2018 09:50:52 +0000 (11:50 +0200)]
avfilter: add fftdnoiz filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agolavfi/tests/filtfmts: fix the build warning.
Jun Zhao [Sun, 6 May 2018 01:33:28 +0000 (09:33 +0800)]
lavfi/tests/filtfmts: fix the build warning.

fix the build warning: ignoring return value.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agocheckasm/sw_rgb: fix the function declaration warning
Jun Zhao [Sun, 6 May 2018 01:33:27 +0000 (09:33 +0800)]
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>
6 years agolavf/network: fix doxygen comments.
Jun Zhao [Sun, 6 May 2018 11:53:19 +0000 (19:53 +0800)]
lavf/network: fix doxygen comments.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agoavformat/mxfenc: add h264 profiles
Thomas Mundt [Sun, 6 May 2018 19:05:47 +0000 (21:05 +0200)]
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>
6 years agoavfilter/vf_hwupload_cuda: update supported pix_fmts
Timo Rothenpieler [Wed, 9 May 2018 20:30:34 +0000 (22:30 +0200)]
avfilter/vf_hwupload_cuda: update supported pix_fmts

6 years agoavutil/hwcontext_cuda: use generic size and pointer assignment functions
Timo Rothenpieler [Wed, 9 May 2018 19:18:15 +0000 (21:18 +0200)]
avutil/hwcontext_cuda: use generic size and pointer assignment functions

6 years agoavutil/hwcontext_cuda: add support for nvenc rgb formats
Timo Rothenpieler [Wed, 9 May 2018 16:59:05 +0000 (18:59 +0200)]
avutil/hwcontext_cuda: add support for nvenc rgb formats

6 years agoavcodec/cuviddec: explicitly synchronize cuMemcpy calls
Timo Rothenpieler [Tue, 8 May 2018 11:56:51 +0000 (13:56 +0200)]
avcodec/cuviddec: explicitly synchronize cuMemcpy calls

6 years agoavutil/hwcontext_cuda: explicitly synchronize cuMemcpy calls
Timo Rothenpieler [Tue, 8 May 2018 10:12:01 +0000 (12:12 +0200)]
avutil/hwcontext_cuda: explicitly synchronize cuMemcpy calls

6 years agoavcodec/nvdec: pass CUstream in vpp parameters
Timo Rothenpieler [Mon, 7 May 2018 22:07:31 +0000 (00:07 +0200)]
avcodec/nvdec: pass CUstream in vpp parameters

6 years agoavutil/hwcontext_cuda: add CUstream in cuda hwctx
Timo Rothenpieler [Mon, 7 May 2018 13:01:22 +0000 (15:01 +0200)]
avutil/hwcontext_cuda: add CUstream in cuda hwctx

6 years agoavcodec/nvdec: avoid needless copy of output frame
Timo Rothenpieler [Mon, 7 May 2018 16:23:38 +0000 (18:23 +0200)]
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.

6 years agoRevert "avcodec/nvenc: make hw_frames_ctx fully optional"
Timo Rothenpieler [Mon, 7 May 2018 20:39:20 +0000 (22:39 +0200)]
Revert "avcodec/nvenc: make hw_frames_ctx fully optional"

This reverts commit 7d4e1f7cfb667585514bfa0a4d0fee2f717a93ed.

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.

6 years agoavformat/mpegts: clean up whitespace
Aman Gupta [Wed, 9 May 2018 19:43:38 +0000 (12:43 -0700)]
avformat/mpegts: clean up whitespace

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavformat/mpegts: use MAX_SECTION_SIZE instead of hardcoded value
Aman Gupta [Wed, 9 May 2018 19:42:14 +0000 (12:42 -0700)]
avformat/mpegts: use MAX_SECTION_SIZE instead of hardcoded value

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavformat/mpegts: skip non-PMT tids earlier
Aman Gupta [Tue, 8 May 2018 22:07:35 +0000 (15:07 -0700)]
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>
6 years agoffprobe: fix SEGV when new streams are added
Aman Gupta [Tue, 8 May 2018 19:46:12 +0000 (12:46 -0700)]
ffprobe: fix SEGV when new streams are added

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavcodec/hevc: remove videotoolbox hack
Aman Gupta [Fri, 4 May 2018 21:57:50 +0000 (14:57 -0700)]
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>
6 years agoavcodec/videotoolbox: split h264/hevc callbacks
Aman Gupta [Fri, 4 May 2018 21:58:08 +0000 (14:58 -0700)]
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>
6 years agoavcodec/videotoolbox: cleanups
Aman Gupta [Fri, 4 May 2018 21:57:32 +0000 (14:57 -0700)]
avcodec/videotoolbox: cleanups

No functional changes.

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavcodec/cbs_h2645: use AVBufferRef to store list of active parameter sets
James Almer [Tue, 8 May 2018 23:09:28 +0000 (20:09 -0300)]
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>
6 years agoavformat/mxfenc: Write transfer characteristic
Michael Niedermayer [Wed, 21 Mar 2018 20:34:20 +0000 (21:34 +0100)]
avformat/mxfenc: Write transfer characteristic

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10
Michael Niedermayer [Tue, 17 Apr 2018 22:09:00 +0000 (00:09 +0200)]
avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Write Audio Ref Level for D10
Michael Niedermayer [Fri, 6 Apr 2018 19:44:23 +0000 (21:44 +0200)]
avformat/mxfenc: Write Audio Ref Level for D10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add Padding Bits
Michael Niedermayer [Thu, 5 Apr 2018 21:30:37 +0000 (23:30 +0200)]
avformat/mxfenc: Add Padding Bits

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: add white/black ref /color range
Michael Niedermayer [Thu, 5 Apr 2018 20:53:22 +0000 (22:53 +0200)]
avformat/mxfenc: add white/black ref /color range

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add vertical subsampling support
Michael Niedermayer [Wed, 21 Mar 2018 18:32:32 +0000 (19:32 +0100)]
avformat/mxfenc: Add vertical subsampling support

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Fix stored width
Michael Niedermayer [Sat, 17 Mar 2018 22:04:50 +0000 (23:04 +0100)]
avformat/mxfenc: Fix stored width

This fixes the width to have computations matching the height

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add object model version
Michael Niedermayer [Sat, 17 Mar 2018 20:16:26 +0000 (21:16 +0100)]
avformat/mxfenc: Add object model version

Other tools (XFConvert at least) write this as well.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>