[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

Re: [libav-devel] [PATCH] lavu: Add DRM hwcontext

2017-06-29 Thread Mark Thompson
On 29/06/17 08:31, Diego Biurrun wrote: > On Sun, Jun 18, 2017 at 07:08:02PM +0100, Mark Thompson wrote: >> --- a/configure >> +++ b/configure >> @@ -190,6 +190,7 @@ External library support: >>--enable-avisynth video frameserver >>--enabl

Re: [libav-devel] [PATCH 07/12] lavfi: Add some common code for OpenCL filtering

2017-06-29 Thread Mark Thompson
On 29/06/17 02:16, Jun Zhao wrote: > On 2017/6/28 5:50, Mark Thompson wrote: >> --- >> libavfilter/Makefile | 6 + >> libavfilter/opencl.c | 285 >> +++ >> libavfilter/opencl.h | 74 +++

Re: [libav-devel] [PATCH] lavu: Add DRM hwcontext

2017-06-28 Thread Mark Thompson
On 28/06/17 16:24, Rémi Denis-Courmont wrote: > Le sunnuntaina 18. kesäkuuta 2017, 19.08.02 EEST Mark Thompson a écrit : >> --- >> The intent of this is to have a common structure which can be used in all >> cases where DRM objects need to be shared between components. I

Re: [libav-devel] [PATCH 02/12] lavu: OpenCL hwcontext implementation

2017-06-28 Thread Mark Thompson
On 28/06/17 15:03, wm4 wrote: > On Wed, 28 Jun 2017 13:36:30 +0100 > Mark Thompson <s...@jkqxz.net> wrote: > >> On 28/06/17 12:03, wm4 wrote: >>> On Tue, 27 Jun 2017 22:50:44 +0100 >>> Mark Thompson <s...@jkqxz.net> wrote: >>> >>>

Re: [libav-devel] [PATCH 12/12] test-only: Create D3D11 textures with D3D11_RESOURCE_MISC_SHARED

2017-06-28 Thread Mark Thompson
On 28/06/17 15:06, wm4 wrote: > On Wed, 28 Jun 2017 13:51:26 +0100 > Mark Thompson <s...@jkqxz.net> wrote: > >> On 28/06/17 12:13, wm4 wrote: >>> On Tue, 27 Jun 2017 22:50:54 +0100 >>> Mark Thompson <s...@jkqxz.net> wrote: >>> >>&g

Re: [libav-devel] [PATCH 12/12] test-only: Create D3D11 textures with D3D11_RESOURCE_MISC_SHARED

2017-06-28 Thread Mark Thompson
On 28/06/17 12:13, wm4 wrote: > On Tue, 27 Jun 2017 22:50:54 +0100 > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> libavutil/hwcontext_d3d11va.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavutil/hwcontext_d3d11

Re: [libav-devel] [PATCH 03/12] hwcontext_opencl: VAAPI to OpenCL mapping for Intel i965+beignet

2017-06-28 Thread Mark Thompson
On 28/06/17 12:09, wm4 wrote: > On Tue, 27 Jun 2017 22:50:45 +0100 > Mark Thompson <s...@jkqxz.net> wrote: > >> Supports all surface formats in common between the two. >> --- >> configure | 6 + >> libavutil/hwcontext_internal.h |

Re: [libav-devel] [PATCH 02/12] lavu: OpenCL hwcontext implementation

2017-06-28 Thread Mark Thompson
On 28/06/17 12:03, wm4 wrote: > On Tue, 27 Jun 2017 22:50:44 +0100 > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> configure |5 +- >> doc/APIchanges |4 + >> libavutil/Makefile |2 + &g

Re: [libav-devel] [PATCH 05/12] hwcontext_opencl: DXVA2 to OpenCL mapping

2017-06-27 Thread Mark Thompson
On 27/06/17 22:50, Mark Thompson wrote: > Using cl_khr_dx9_media_sharing. > --- > configure| 6 + > libavutil/hwcontext_opencl.c | 396 > +++ > 2 files changed, 402 insertions(+) > > ... > +static int ope

[libav-devel] [PATCH 09/12] lavfi: Add OpenCL overlay filter

2017-06-27 Thread Mark Thompson
Currently works only with RGBA on top of NV12. --- configure | 1 + libavfilter/Makefile| 2 + libavfilter/allfilters.c| 1 + libavfilter/opencl/overlay.cl | 73 + libavfilter/opencl_source.h | 1 + libavfilter/vf_overlay_opencl.c |

[libav-devel] [PATCH 08/12] lavfi: Add filter to run an arbitrary OpenCL program on frames

2017-06-27 Thread Mark Thompson
--- configure | 1 + libavfilter/Makefile| 1 + libavfilter/allfilters.c| 1 + libavfilter/vf_program_opencl.c | 259 4 files changed, 262 insertions(+) create mode 100644 libavfilter/vf_program_opencl.c

[libav-devel] [PATCH 07/12] lavfi: Add some common code for OpenCL filtering

2017-06-27 Thread Mark Thompson
--- libavfilter/Makefile | 6 + libavfilter/opencl.c | 285 +++ libavfilter/opencl.h | 74 +++ libavfilter/opencl/rgbyuv.cl | 117 ++ libavfilter/opencl_source.h | 24 tools/cl2c |

[libav-devel] [PATCH 02/12] lavu: OpenCL hwcontext implementation

2017-06-27 Thread Mark Thompson
--- configure |5 +- doc/APIchanges |4 + libavutil/Makefile |2 + libavutil/hwcontext.c |4 + libavutil/hwcontext.h |1 + libavutil/hwcontext_internal.h |1 + libavutil/hwcontext_opencl.c | 1303

[libav-devel] [PATCH 00/12] OpenCL hwcontext, mapping, filtering

2017-06-27 Thread Mark Thompson
After some delay... Lots of changes everywhere: * The cl_khr_image2d_from_buffer requirement is entirely removed. This also removes Beignet -> VAAPI mapping, but that was a bit clumsy anyway (gave you X-tiled surfaces by default which VAAPI then always copied to Y-tiled surfaces internally).

[libav-devel] [PATCH 05/12] hwcontext_opencl: DXVA2 to OpenCL mapping

2017-06-27 Thread Mark Thompson
Using cl_khr_dx9_media_sharing. --- configure| 6 + libavutil/hwcontext_opencl.c | 396 +++ 2 files changed, 402 insertions(+) diff --git a/configure b/configure index e6b416e1c..a27254c87 100755 --- a/configure +++ b/configure @@

[libav-devel] [PATCH 01/12] lavu: Add OpenCL hardware pixfmt

2017-06-27 Thread Mark Thompson
--- doc/APIchanges | 3 +++ libavutil/pixdesc.c | 4 libavutil/pixfmt.h | 7 +++ libavutil/version.h | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 0f7c83957..764449bfe 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@

[libav-devel] [PATCH 10/12] vf_hwmap: Pass mapping mode when deriving frames context on an existing device

2017-06-27 Thread Mark Thompson
To match creation on a newly-derived device. (This was missed earlier because the mode is only used in some cases.) --- libavfilter/vf_hwmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index b28cb2145..3a3a502b7 100644

[libav-devel] [PATCH 11/12] hwcontext: Perform usual uninitialisation on derived frames contexts

2017-06-27 Thread Mark Thompson
--- libavutil/hwcontext.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index fccfda5ef..80d52a156 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -209,19 +209,16 @@ static void

[libav-devel] [PATCH 03/12] hwcontext_opencl: VAAPI to OpenCL mapping for Intel i965+beignet

2017-06-27 Thread Mark Thompson
Supports all surface formats in common between the two. --- configure | 6 + libavutil/hwcontext_internal.h | 3 + libavutil/hwcontext_opencl.c | 298 + libavutil/hwcontext_vaapi.c| 9 ++ 4 files changed, 316 insertions(+)

[libav-devel] [PATCH 06/12] hwcontext_opencl: D3D11 to OpenCL mapping

2017-06-27 Thread Mark Thompson
Using cl_khr_d3d11_sharing and cl_intel_d3d11_nv12_media_sharing. --- configure| 6 + libavutil/hwcontext_opencl.c | 320 ++- 2 files changed, 324 insertions(+), 2 deletions(-) diff --git a/configure b/configure index

[libav-devel] [PATCH 12/12] test-only: Create D3D11 textures with D3D11_RESOURCE_MISC_SHARED

2017-06-27 Thread Mark Thompson
--- libavutil/hwcontext_d3d11va.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 75f78d866..543f90d6c 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -227,7 +227,7 @@ static

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

2017-06-24 Thread Mark Thompson
On 24/06/17 16:48, 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 { >>> + >

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

2017-06-23 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/15] h264: Add stream constraint values to the common header

2017-06-23 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

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

2017-06-23 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 12/15] vaapi_h264: Add support for AUD NAL units

2017-06-23 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 84aa97373..624f2b9a8 100644 ---

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

2017-06-23 Thread Mark Thompson
Also improves the metadata and generally makes the configuration a bit cleaner. --- libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h265.c | 1511 +++- libavcodec/vaapi_encode_h26x.c | 68 -- libavcodec/vaapi_encode_h26x.h | 45 -- 4 files

[libav-devel] [PATCH 00/15] Coded bitstream editing (v4)

2017-06-23 Thread Mark Thompson
Since last time: * Moved limit values to common headers and documented them. * Cleaned API, added internal documentation. * Fixes to syntax files from running on more streams, also a bit more complete (yay FMO support). * Logging fixed to actually work properly (trace_headers uses normal logging

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

2017-06-23 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..cf1976507 100644 --- a/libavcodec/vaapi_encode_mpeg2.c +++

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

2017-06-23 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 06/15] lavc: Add coded bitstream read/write support for H.265

2017-06-23 Thread Mark Thompson
--- libavcodec/cbs.c |1 + libavcodec/cbs_h2645.c | 410 +++- libavcodec/cbs_h265.h| 544 libavcodec/cbs_h265_syntax.c | 1482 ++ libavcodec/cbs_internal.h|1 + 5 files changed, 2435

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

2017-06-23 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. --- doc/bitstream_filters.texi | 47 + libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/h264_metadata_bsf.c |

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

2017-06-23 Thread Mark Thompson
--- libavcodec/cbs.c | 1 + libavcodec/cbs_internal.h | 1 + libavcodec/cbs_mpeg2.c| 355 libavcodec/cbs_mpeg2.h| 207 libavcodec/cbs_mpeg2_syntax.c | 367

[libav-devel] [PATCH 13/15] vaapi_h264: Add support for SEI recovery points

2017-06-23 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 624f2b9a8..7c9c96a3a 100644 ---

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

2017-06-23 Thread Mark Thompson
Supports all streams that the coded bitstream infrastructure does (currently H.264, H.265 and MPEG-2). --- doc/bitstream_filters.texi | 8 +++ libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/trace_headers_bsf.c | 113

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

2017-06-23 Thread Mark Thompson
--- libavcodec/cbs.c |1 + libavcodec/cbs_h264.h| 426 +++ libavcodec/cbs_h2645.c | 800 +++ libavcodec/cbs_h2645.h | 42 ++ libavcodec/cbs_h264_syntax.c | 1224 ++

[libav-devel] [PATCH 11/15] vaapi_h264: Convert to use coded bitstream infrastructure

2017-06-23 Thread Mark Thompson
--- libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h264.c | 1419 2 files changed, 547 insertions(+), 874 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 31fb412eb..ffca7a103 100644 --- a/libavcodec/Makefile

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

2017-06-23 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] lavu: Add DRM hwcontext

2017-06-18 Thread Mark Thompson
--- The intent of this is to have a common structure which can be used in all cases where DRM objects need to be shared between components. It would be helpful if anyone familiar with specific drivers or use-cases could ensure that the structure (see the hwcontext_drm.h header) is sufficiently

[libav-devel] [PATCH 3/3] avconv_hw: Free device on initialisation failure

2017-06-16 Thread Mark Thompson
--- avtools/avconv_hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/avtools/avconv_hw.c b/avtools/avconv_hw.c index 94be72330..81af54a19 100644 --- a/avtools/avconv_hw.c +++ b/avtools/avconv_hw.c @@ -208,6 +208,7 @@ invalid: fail: av_log(NULL, AV_LOG_ERROR, "Device

[libav-devel] [PATCH 2/3] vf_hwmap: Properly free locally derived device

2017-06-16 Thread Mark Thompson
--- libavfilter/vf_hwmap.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index 48ebbb6bd..b28cb2145 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -54,7 +54,7 @@ static int

[libav-devel] [PATCH 1/3] vf_hwmap: Add missing error code

2017-06-16 Thread Mark Thompson
--- (These three from coverity on the other tine.) libavfilter/vf_hwmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index 2983528ea..48ebbb6bd 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -73,6 +73,7 @@ static int

[libav-devel] [PATCH] hwcontext: Mark read-only table static

2017-06-13 Thread Mark Thompson
--- libavutil/hwcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index d82df56ab..689267dea 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -50,7 +50,7 @@ static const HWContextType * const hw_table[] = {

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

2017-05-25 Thread Mark Thompson
On 21/05/17 09:46, Anton Khirnov wrote: > Quoting Mark Thompson (2017-05-14 23:24:11) >> --- >> libavcodec/cbs.c |1 + >> libavcodec/cbs_h264.h| 396 +++ >> libavcodec/cbs_h2645.c | 734 >&

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

2017-05-25 Thread Mark Thompson
On 20/05/17 08:04, Anton Khirnov wrote: > Quoting Mark Thompson (2017-05-14 23:24:11) >> --- >> libavcodec/cbs.c |1 + >> libavcodec/cbs_h264.h| 396 +++ >> libavcodec/cbs_h2645.c | 734 >&

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

2017-05-25 Thread Mark Thompson
On 20/05/17 08:02, Anton Khirnov wrote: > Quoting Mark Thompson (2017-05-14 23:24:15) >> 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. >> --- >> doc/bitstream_filters.texi

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

2017-05-25 Thread Mark Thompson
On 20/05/17 07:35, Anton Khirnov wrote: > Quoting Mark Thompson (2017-05-14 23:24:10) >> +int ff_cbs_insert_unit(CodedBitstreamContext *ctx, >> + CodedBitstreamFragment *frag, >> + int position, int type, void *content)

Re: [libav-devel] [PATCH] vaapi: Add ABGR map only if VA_FOURCC_ABGR is defined

2017-05-25 Thread Mark Thompson
On 24/05/17 13:33, Luca Barbato wrote: > From: Elviss Strazdins > > --- > > Provided as PR on github. Mark do you have opinions on this? > > libavutil/hwcontext_vaapi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavutil/hwcontext_vaapi.c

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

2017-05-15 Thread Mark Thompson
On 15/05/17 14:34, James Almer wrote: > On 5/14/2017 6:24 PM, Mark Thompson wrote: >> +static int FUNC(vui_parameters)(CodedBitstreamContext *ctx, RWContext *rw, >> +H265RawVUI *current) >> +{ >> +CodedBitstreamH265Context *h265 = ct

[libav-devel] [PATCH 02/14] h264_sei: Add namespace prefix to all SEI values

2017-05-15 Thread Mark Thompson
This avoids confusion with equivalent H.265 SEI values when both are being used at the same time. --- On 15/05/17 14:22, James Almer wrote: > On 5/15/2017 4:47 AM, Mark Thompson wrote: >> On 15/05/17 02:25, James Almer wrote: >>> On 5/14/2017 6:24 PM, Mark Thompson wrote: >>

Re: [libav-devel] [PATCH 02/14] h264: Move SEI types to common header

2017-05-15 Thread Mark Thompson
On 15/05/17 02:25, James Almer wrote: > On 5/14/2017 6:24 PM, Mark Thompson wrote: >> Also add a namespace prefix. >> --- >> libavcodec/h264.h | 12 >> libavcodec/h264_sei.c | 14 +++--- >> li

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

2017-05-14 Thread Mark Thompson
Also improves the metadata and generally makes the configuration a bit cleaner. --- libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h265.c | 1511 +++- libavcodec/vaapi_encode_h26x.c | 68 -- libavcodec/vaapi_encode_h26x.h | 45 -- 4 files

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

2017-05-14 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 66f8e2490..80476445c 100644 ---

[libav-devel] [PATCH 11/14] vaapi_h264: Convert to use coded bitstream infrastructure

2017-05-14 Thread Mark Thompson
--- libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h264.c | 1418 +++- 2 files changed, 545 insertions(+), 875 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 83bfdd338..1dc8cd63f 100644 --- a/libavcodec/Makefile

[libav-devel] [PATCH 12/14] vaapi_h264: Add support for AUD NAL units

2017-05-14 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 69f17dac2..66f8e2490 100644 ---

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

2017-05-14 Thread Mark Thompson
--- libavcodec/cbs.c | 1 + libavcodec/cbs_internal.h | 1 + libavcodec/cbs_mpeg2.c| 212 libavcodec/cbs_mpeg2.h| 165 ++ libavcodec/cbs_mpeg2_syntax.c | 318 ++ 5 files

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

2017-05-14 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 08/14] lavc: Add trace_headers bitstream filter

2017-05-14 Thread Mark Thompson
Supports all streams that the coded bitstream infrastructure does (currently H.264, H.265 and MPEG-2). --- doc/bitstream_filters.texi | 14 libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/trace_headers_bsf.c | 167

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

2017-05-14 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. --- doc/bitstream_filters.texi | 47 + libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/h264_metadata_bsf.c |

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

2017-05-14 Thread Mark Thompson
--- libavcodec/cbs.c |1 + libavcodec/cbs_h264.h| 396 +++ libavcodec/cbs_h2645.c | 734 libavcodec/cbs_h264_syntax.c | 1099 ++ libavcodec/cbs_internal.h|3 + 5 files changed,

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

2017-05-14 Thread Mark Thompson
--- libavcodec/cbs.c |1 + libavcodec/cbs_h2645.c | 463 - libavcodec/cbs_h265.h| 557 libavcodec/cbs_h265_syntax.c | 1484 ++ libavcodec/cbs_internal.h|1 + 5 files changed, 2504

[libav-devel] [PATCH 03/14] hevc: Add names for reserved NAL unit types

2017-05-14 Thread Mark Thompson
While not yet used, these NAL units do already have some defined semantics and are referred to elsewhere. --- libavcodec/hevc.h | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index bb4f66058..9d956d083 100644 --- a/libavcodec/hevc.h +++

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

2017-05-14 Thread Mark Thompson
--- libavcodec/cbs.c | 595 ++ libavcodec/cbs.h | 115 + libavcodec/cbs_internal.h | 85 +++ 3 files changed, 795 insertions(+) create mode 100644 libavcodec/cbs.c create mode 100644 libavcodec/cbs.h create mode 100644

[libav-devel] [PATCH 02/14] h264: Move SEI types to common header

2017-05-14 Thread Mark Thompson
Also add a namespace prefix. --- libavcodec/h264.h | 12 libavcodec/h264_sei.c | 14 +++--- libavcodec/h264_sei.h | 14 +- libavcodec/vaapi_encode_h264.c | 6 +++--- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git

[libav-devel] [PATCH 01/14] avconv: Flush output BSFs when stream copy reaches EOF

2017-05-14 Thread Mark Thompson
Same as f64d1100a54d12c78ce436181bb64229c56da6b3, for stream copy rather than encode. --- avtools/avconv.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/avtools/avconv.c b/avtools/avconv.c index 2e218e96c..719d289ff 100644 --- a/avtools/avconv.c +++

[libav-devel] [PATCH 00/14] Coded bitstream editing (v3)

2017-05-14 Thread Mark Thompson
The main change here is addition of H.265 support, and subsequent use of it in the VAAPI encoder. API is a bit improved, and various bugs in H.264 are fixed. Any thoughts at all still welcome. Thanks, - Mark Todo: * Run the readers on more streams, especially H.265 (there are probably some

Re: [libav-devel] [PATCH 1/5] lavu: add new D3D11 pixfmt and hwcontext

2017-05-09 Thread Mark Thompson
On 09/05/17 09:04, wm4 wrote: > On Tue, 9 May 2017 08:48:45 +0100 > Mark Thompson <s...@jkqxz.net> wrote: > >> On 09/05/17 06:07, wm4 wrote: >>> On Mon, 8 May 2017 22:59:11 +0100 >>> Mark Thompson <s...@jkqxz.net> wrote: >>>> On 04/05/1

Re: [libav-devel] [PATCH 1/5] lavu: add new D3D11 pixfmt and hwcontext

2017-05-09 Thread Mark Thompson
On 09/05/17 06:07, wm4 wrote: > On Mon, 8 May 2017 22:59:11 +0100 > Mark Thompson <s...@jkqxz.net> wrote: >> On 04/05/17 07:44, wm4 wrote: >>> To be used with the new d3d11 hwaccel decode API. >>> >>> With the new hwaccel API, we don't want surf

Re: [libav-devel] [PATCH 5/5] dxva: add support for new dxva2 and d3d11 hwaccel APIs

2017-05-08 Thread Mark Thompson
On 04/05/17 07:44, wm4 wrote: > This also adds support to avconv (which is trivial due to the new > hwaccel API being generic enough). For now, this keeps avconv_dxva2.c as > "dxva2-old", although it doesn't work as avconv.c can't handle multiple > hwaccels with the same pixfmt. Is there any

Re: [libav-devel] [PATCH 4/5] dxva: move d3d11 locking/unlocking to functions

2017-05-08 Thread Mark Thompson
On 04/05/17 07:44, wm4 wrote: > I want to make it non-mandatory to set a mutex in the D3D11 device > context, and replacing it with user callbacks seems like the best > solution. This is preparation for it. Also makes the code slightly more > readable. > --- > And yes, only because

Re: [libav-devel] [PATCH 3/5] dxva: preparations for new hwaccel API

2017-05-08 Thread Mark Thompson
On 04/05/17 07:44, wm4 wrote: > The actual hwaccel code will need to access an internal context instead > of avctx->hwaccel_context, so add a new DXVA_CONTEXT() macro, that will > dispatch between the "old" external and the new internal context. > > Also, the new API requires a new D3D11 pixfmt,

Re: [libav-devel] [PATCH 2/5] lavc: set avctx->hwaccel before init

2017-05-08 Thread Mark Thompson
On 04/05/17 07:44, wm4 wrote: > So a hwaccel can access avctx->hwaccel in init for whatever reason. This > is for the new d3d hwaccel API. We could create separate entrypoints for > each of the 3 hwaccel types (dxva2, d3d11va, new d3d11va), but this > seems nicer. > --- > libavcodec/decode.c | 4

Re: [libav-devel] [PATCH 1/5] lavu: add new D3D11 pixfmt and hwcontext

2017-05-08 Thread Mark Thompson
On 04/05/17 07:44, wm4 wrote: > To be used with the new d3d11 hwaccel decode API. > > With the new hwaccel API, we don't want surfaces to depend on the > decoder (other than the required dimension and format). The old D3D11VA > pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the

Re: [libav-devel] [PATCH 0/5] New D3D hwaccel API stuff

2017-05-08 Thread Mark Thompson
On 04/05/17 07:44, wm4 wrote: > Radically rebased, and omits a few in-between commits that are > unnecessary for the end result. avconv_dxva2.c should probably > also be deleted, but for now it'd only inflate the diff. As > part of the rebase I've also removed Steve Lhomme as author > name - let

[libav-devel] [PATCH 05/10] lavc: Add trace_headers bitstream filter

2017-05-07 Thread Mark Thompson
Supports all streams that the coded bitstream infrastructure does (currently H.264 and MPEG-2). --- doc/bitstream_filters.texi | 14 libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/trace_headers_bsf.c | 179

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

2017-05-07 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 9b9b9d617..2035445d7 100644 ---

[libav-devel] [PATCH 00/10] Coded bitstream editing support

2017-05-07 Thread Mark Thompson
So, I went a bit further and made it into an internal API usable with other codecs. H.264 has a pretty much full implementation (though still missing some SEI and the silly baseline features (FMO <3)). Also included is a partial MPEG-2 implementation, missing writing support. h264_trace has

[libav-devel] [PATCH 09/10] vaapi_h264: Add support for AUD NAL units

2017-05-07 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 0c5b06910..9b9b9d617 100644 ---

[libav-devel] [PATCH 06/10] lavc: Add h264_metadata bitstream filter

2017-05-07 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. --- doc/bitstream_filters.texi | 47 + libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 1 + libavcodec/h264_metadata_bsf.c |

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

2017-05-07 Thread Mark Thompson
--- libavcodec/cbs_h264.c| 730 +++ libavcodec/cbs_h264.h| 394 +++ libavcodec/cbs_h264_syntax.c | 1113 ++ libavcodec/h264_sei.h|1 + 4 files changed, 2238 insertions(+) create mode 100644

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

2017-05-07 Thread Mark Thompson
--- libavcodec/cbs_mpeg2.c| 212 libavcodec/cbs_mpeg2.h| 169 ++ libavcodec/cbs_mpeg2_syntax.c | 318 ++ 3 files changed, 699 insertions(+) create mode 100644 libavcodec/cbs_mpeg2.c create

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

2017-05-07 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 08/10] vaapi_h264: Convert to use coded bitstream infrastructure

2017-05-07 Thread Mark Thompson
--- libavcodec/Makefile|2 +- libavcodec/vaapi_encode_h264.c | 1412 +++- 2 files changed, 542 insertions(+), 872 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 61de3712f..85aaaee13 100644 --- a/libavcodec/Makefile

[libav-devel] [PATCH 02/10] lavc: Add coded bitstream read/write API

2017-05-07 Thread Mark Thompson
--- libavcodec/cbs.c | 567 ++ libavcodec/cbs.h | 115 ++ libavcodec/cbs_internal.h | 85 +++ 3 files changed, 767 insertions(+) create mode 100644 libavcodec/cbs.c create mode 100644 libavcodec/cbs.h create mode 100644

[libav-devel] [PATCH 01/10] avconv: Flush output BSFs when stream copy reaches EOF

2017-05-07 Thread Mark Thompson
Same as f64d1100a54d12c78ce436181bb64229c56da6b3, for stream copy rather than encode. --- avtools/avconv.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/avtools/avconv.c b/avtools/avconv.c index 2e218e96c..719d289ff 100644 --- a/avtools/avconv.c +++

[libav-devel] [PATCH] doc: Document hwupload, hwdownload and hwmap filters

2017-04-30 Thread Mark Thompson
--- doc/filters.texi | 98 1 file changed, 98 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 947fd7915..f57fbf6c4 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1657,6 +1657,104 @@ A floating point number

<    1   2   3   4   5   6   7   8   9   10   >