[libav-devel] [PATCH 2/3] libavformat/mov: fix error paths in mov_read_stsd()

2017-07-29 Thread Sean McGovern
Based on an FFmpeg patch by Michael Niedermayer --- libavformat/mov.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 8ff6022..e56b8e9 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c

[libav-devel] [PATCH 3/3] mov: move stsd finalization to an appropriate place

2017-07-29 Thread Sean McGovern
mov_finalize_stsd_codec parses stream information from the ALAC extradata, so run it after the extradata processing is completed in mov_read_stsd. Fixes playback of 96kHz ALAC streams muxed by qaac or the reference alac encoder. Adapted from an FFmpeg patch by Hendrik Leppkes

[libav-devel] [PATCH 1/3] libavformat/mov: log and return early on non-positive stsd entry counts

2017-07-29 Thread Sean McGovern
Based on an FFmpeg patch by Michael Niedermayer --- libavformat/mov.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index bf68fbd..8ff6022 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1875,6 +1875,11 @@ static

Re: [libav-devel] [PATCH 01/15] h264: Add stream constraint values to the common header

2017-07-29 Thread Mark Thompson
On 29/07/17 23:12, Hendrik Leppkes wrote: > On Sat, Jun 24, 2017 at 5:48 PM, Diego Biurrun wrote: >> On Sat, Jun 24, 2017 at 11:56:07AM -0300, James Almer wrote: >>> On 6/23/2017 8:39 PM, Mark Thompson wrote: --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@

Re: [libav-devel] [PATCH 01/15] h264: Add stream constraint values to the common header

2017-07-29 Thread Hendrik Leppkes
On Sat, Jun 24, 2017 at 5:48 PM, Diego Biurrun wrote: > On Sat, Jun 24, 2017 at 11:56:07AM -0300, James Almer wrote: >> On 6/23/2017 8:39 PM, Mark Thompson wrote: >> > --- a/libavcodec/h264.h >> > +++ b/libavcodec/h264.h >> > @@ -44,4 +44,49 @@ enum { >> > + >> > +enum { >> >>

[libav-devel] [PATCH 19/22] hevc: Remove unused hevc_ps_enc.c

2017-07-29 Thread Mark Thompson
Replaced with more complete implementation via coded bitstream infrastructure. --- libavcodec/hevc_ps.h | 3 -- libavcodec/hevc_ps_enc.c | 118 --- 2 files changed, 121 deletions(-) delete mode 100644 libavcodec/hevc_ps_enc.c diff --git

[libav-devel] [PATCH 08/22] lavc: Add trace_headers bitstream filter

2017-07-29 Thread Mark Thompson
Supports all streams that the coded bitstream infrastructure does (currently H.264, H.265 and MPEG-2). --- * Header now contains all of pts, dts, size and packet flags. doc/bitstream_filters.texi | 8 +++ libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 +

[libav-devel] [PATCH 18/22] qsvenc_hevc: Replace ad-hoc VPS writing with CBS implementation

2017-07-29 Thread Mark Thompson
This copies more information which should be present from the SPS. It also fixes the value of vps_temporal_id_nesting_flag, which was previously incorrect for a single-layer stream (the standard states that it must be 1, and the reference decoder barfs if it isn't). --- Tested on Linux / Skylake.

[libav-devel] [PATCH 13/22] vaapi_h264: Add support for AUD NAL units

2017-07-29 Thread Mark Thompson
Adds a new private option to enable them (off by default). --- libavcodec/vaapi_encode_h264.c | 33 + 1 file changed, 33 insertions(+) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 8d9b1c6f7..ff73922ab 100644 ---

[libav-devel] [PATCH 17/22] vaapi_mpeg2: Convert to use coded bitstream infrastructure

2017-07-29 Thread Mark Thompson
--- libavcodec/vaapi_encode_mpeg2.c | 670 +++- 1 file changed, 462 insertions(+), 208 deletions(-) diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c index 634178521..67ac9d25a 100644 --- a/libavcodec/vaapi_encode_mpeg2.c +++

[libav-devel] [PATCH 00/22] Coded bitstream editing (v5)

2017-07-29 Thread Mark Thompson
Mainly minor updates. Significant additions: * H.265 metadata bitstream filter * H.265 in VAAPI is generally improved - more metadata, AUDs are added. * The VPS writing code in qsvenc is replaced, and the old code removed. * Use of anonymous unions removed. Thanks, - Mark

[libav-devel] [PATCH 15/22] vaapi_h265: Convert to use coded bitstream infrastructure

2017-07-29 Thread Mark Thompson
Also improves the metadata and generally makes the configuration a bit cleaner. --- * Improved frame typing - now supports I frames as CRA. libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h265.c | 1544 +++- libavcodec/vaapi_encode_h26x.c |

[libav-devel] [PATCH 04/22] lavc: Add coded bitstream read/write API

2017-07-29 Thread Mark Thompson
--- libavcodec/cbs.c | 656 ++ libavcodec/cbs.h | 274 +++ libavcodec/cbs_internal.h | 99 +++ 3 files changed, 1029 insertions(+) create mode 100644 libavcodec/cbs.c create mode 100644 libavcodec/cbs.h create

[libav-devel] [PATCH 16/22] vaapi_h265: Add support for AUD NAL units

2017-07-29 Thread Mark Thompson
Matching the H.264 encoder. --- libavcodec/vaapi_encode_h265.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 2059a8f41..90f478fd7 100644 --- a/libavcodec/vaapi_encode_h265.c +++

[libav-devel] [PATCH 12/22] vaapi_h264: Convert to use coded bitstream infrastructure

2017-07-29 Thread Mark Thompson
--- libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h264.c | 1421 2 files changed, 548 insertions(+), 875 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 0d8d5eb44..d1fd6fae2 100644 --- a/libavcodec/Makefile

[libav-devel] [PATCH 11/22] lavc: Add hevc_metadata bitstream filter

2017-07-29 Thread Mark Thompson
This is able to modify some header metadata found in the VPS/SPS/VUI, and can also add/remove AUDs. --- doc/bitstream_filters.texi | 54 ++ libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/h265_metadata_bsf.c | 429

[libav-devel] [PATCH 07/22] lavc: Add coded bitstream read/write support for MPEG-2

2017-07-29 Thread Mark Thompson
--- libavcodec/cbs.c | 1 + libavcodec/cbs_internal.h | 1 + libavcodec/cbs_mpeg2.c| 355 ++ libavcodec/cbs_mpeg2.h| 208 + libavcodec/cbs_mpeg2_syntax.c | 340

[libav-devel] [PATCH 05/22] lavc: Add coded bitstream read/write support for H.264

2017-07-29 Thread Mark Thompson
--- libavcodec/cbs.c |1 + libavcodec/cbs_h264.h| 427 +++ libavcodec/cbs_h2645.c | 800 +++ libavcodec/cbs_h2645.h | 43 ++ libavcodec/cbs_h264_syntax.c | 1230 ++

[libav-devel] [PATCH 06/22] lavc: Add coded bitstream read/write support for H.265

2017-07-29 Thread Mark Thompson
--- * NAL unit header extracted to a separate structure. * VPS no longer required (for patch 18). * Inferred prediction weights fixed. libavcodec/cbs.c |1 + libavcodec/cbs_h2645.c | 410 +++- libavcodec/cbs_h265.h| 537 +++

[libav-devel] [PATCH 10/22] lavc: Add h264_redundant_pps bitstream filter

2017-07-29 Thread Mark Thompson
This applies a specific fixup to some Bluray streams which contain redundant PPSs modifying irrelevant parameters of the stream which confuse other transformations which require correct extradata. A new single global PPS is created, and all of the redundant PPSs within the stream are removed. ---

[libav-devel] [PATCH 14/22] vaapi_h264: Add support for SEI recovery points

2017-07-29 Thread Mark Thompson
Included by default with non-IDR intra frames. --- libavcodec/vaapi_encode_h264.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index ff73922ab..d10ecfd7b 100644 ---

[libav-devel] [PATCH 09/22] lavc: Add h264_metadata bitstream filter

2017-07-29 Thread Mark Thompson
This is able to modify some header metadata found in the SPS/VUI, and can also add/remove AUDs and insert user data in SEI NAL units. --- * Adds cropping parameters. * SEI user data insert code improved as suggested by Jun Zhao. doc/bitstream_filters.texi | 57 + libavcodec/Makefile

[libav-devel] [PATCH 03/22] hevc: Validate the number of long term reference pictures

2017-07-29 Thread Mark Thompson
This would overflow if the stream contained a value greater than the maximum allowed by the standard (32). --- libavcodec/hevc_ps.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 74906fd71..2603e6d99 100644 --- a/libavcodec/hevc_ps.c

[libav-devel] [PATCH 02/22] hevc: Improve stream constraint values in common header

2017-07-29 Thread Mark Thompson
Add comments to describe the sources of the constraint values expressed here, and add some more related values which will be used in following patches. Fix the incorrect values for SPS and PPS count (they are not the same as those used for H.264), and remove HEVC_MAX_CU_SIZE because it is not

[libav-devel] [PATCH 01/22] h264: Add stream constraint values to the common header

2017-07-29 Thread Mark Thompson
With comments describing the derivation of each value. --- libavcodec/h264.h | 45 + 1 file changed, 45 insertions(+) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index eb3805c06..aa137b5b5 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h