[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 dif

[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).

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

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 wrote: > >> --- >> configure |5 +- >> doc/APIchanges |4 + >> libavutil/Makefile |2 + >> libavutil/hwco

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 wrote: > >> Supports all surface formats in common between the two. >> --- >> configure | 6 + >> libavutil/hwcontext_internal.h | 3 + >>

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 wrote: > >> --- >> libavutil/hwcontext_d3d11va.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil

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 wrote: > >> On 28/06/17 12:13, wm4 wrote: >>> On Tue, 27 Jun 2017 22:50:54 +0100 >>> Mark Thompson wrote: >>> >>>> --- >>>> libavutil/

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 wrote: > >> On 28/06/17 12:03, wm4 wrote: >>> On Tue, 27 Jun 2017 22:50:44 +0100 >>> Mark Thompson wrote: >>> >>>> --- >>>> configure

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. It w

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-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 >>--enable-a

Re: [libav-devel] [PATCH 03/14] lavu: add a framework for handling hwaccel frames

2016-02-12 Thread Mark Thompson
On 12/02/16 09:09, Anton Khirnov wrote: > --- > doc/APIchanges | 2 + > libavutil/Makefile | 2 + > libavutil/frame.c | 11 ++ > libavutil/frame.h | 6 + > libavutil/hwcontext.c | 397 > +

Re: [libav-devel] [PATH] hwcontext API v4

2016-02-12 Thread Mark Thompson
On 12/02/16 09:09, Anton Khirnov wrote: > Main changes from the last time: > - dropped the new option type > - added a new buffesrc API for setting the stream parameters, > since they are not really "options" > - added (currently unused) flags to some hwframe functions > Ignoring the specific i

[libav-devel] [RFC] VAAPI hwcontext

2016-02-15 Thread Mark Thompson
Hi, Following is a first pass at VAAPI hwcontext implementation, along with an avconv helper to use it for hwaccel decoding. This isn't complete - I am posting it here mainly so that people with an interest in this can tell me how I've done everything wrong. In progress is a scale filter (with

[libav-devel] [PATCH 1/2] lavu: VAAPI hwcontext implementation

2016-02-15 Thread Mark Thompson
--- configure | 5 + libavutil/Makefile | 1 + libavutil/hwcontext.c | 3 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_internal.h | 1 + libavutil/hwcontext_vaapi.c| 715 + libavutil/hwco

[libav-devel] [PATCH 2/2] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-02-15 Thread Mark Thompson
--- Makefile | 1 + avconv.h | 7 + avconv_opt.c | 38 avconv_vaapi.c | 607 + configure | 5 + 5 files changed, 658 insertions(+) create mode 100644 avconv_vaapi.c diff --git a/Makefile b/Makefile index 7b1e5

Re: [libav-devel] [PATCH 1/2] lavu: VAAPI hwcontext implementation

2016-02-16 Thread Mark Thompson
On 16/02/16 11:08, wm4 wrote: > On Mon, 15 Feb 2016 23:24:31 + > Mark Thompson wrote: >> ... >> +MAP(NV12, YUV420, NV12), >> +MAP(IYUV, YUV420, YUV420P), >> +MAP(YV12, YUV420, YUV420P), // With U/V planes swapped. >> +MAP(YV16, YUV422,

Re: [libav-devel] [PATCH 1/2] lavu: VAAPI hwcontext implementation

2016-02-16 Thread Mark Thompson
On 16/02/16 11:38, Diego Biurrun wrote: > On Mon, Feb 15, 2016 at 11:24:31PM +0000, Mark Thompson wrote: >> --- a/configure >> +++ b/configure >> @@ -4712,6 +4713,10 @@ enabled vaapi && enabled xlib && >> >> +enabled vaapi && >> +c

Re: [libav-devel] [PATCH 1/2] lavu: VAAPI hwcontext implementation

2016-02-16 Thread Mark Thompson
On 16/02/16 14:41, Anton Khirnov wrote: > Quoting Diego Biurrun (2016-02-16 15:36:05) >> On Tue, Feb 16, 2016 at 12:16:09PM +0000, Mark Thompson wrote: >>> On 16/02/16 11:38, Diego Biurrun wrote: >>>> On Mon, Feb 15, 2016 at 11:24:31PM +, Mark Thom

Re: [libav-devel] [PATCH 1/2] lavu: VAAPI hwcontext implementation

2016-02-17 Thread Mark Thompson
On 17/02/16 21:14, Anton Khirnov wrote: > Quoting Mark Thompson (2016-02-16 00:24:31) >> diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c >> ... >> +static AVBufferRef *vaapi_pool_alloc(void *opaque, int size) >> +{ >> +AVH

Re: [libav-devel] [PATCH 1/2] lavu: VAAPI hwcontext implementation

2016-02-18 Thread Mark Thompson
On 18/02/16 06:30, Anton Khirnov wrote: > Quoting Mark Thompson (2016-02-17 23:49:13) >> >> How opposed are you to a bit of VAAPI-specific API here? Having got a >> bit further, the one specific which would be useful to avoid annoying >> duplication is the enumeratio

[libav-devel] [PATCH 0/4] VAAPI hwcontext stuff

2016-02-20 Thread Mark Thompson
Hi, Another go at VAAPI hwcontext implementation. This adds a generic method to query the constraints on frames for the given hardware implementation with some specific configuration. Naming is a bit clumsy, but it has all the features I need and will be extensible if we want to add anything

[libav-devel] [PATCH 1/4] lavu: Add a way to query hwcontext frame constraints.

2016-02-20 Thread Mark Thompson
--- libavutil/hwcontext.c | 38 +++ libavutil/hwcontext.h | 58 ++ libavutil/hwcontext_internal.h | 10 3 files changed, 106 insertions(+) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index b6

[libav-devel] [PATCH 2/4] lavu: VAAPI hwcontext implementation

2016-02-20 Thread Mark Thompson
--- configure | 5 + libavutil/Makefile | 2 + libavutil/hwcontext.c | 3 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_internal.h | 1 + libavutil/hwcontext_vaapi.c| 800 + libavutil/hwco

[libav-devel] [PATCH 3/4] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-02-20 Thread Mark Thompson
--- Makefile | 1 + avconv.h | 7 + avconv_opt.c | 38 avconv_vaapi.c | 628 + configure | 5 + 5 files changed, 679 insertions(+) create mode 100644 avconv_vaapi.c diff --git a/Makefile b/Makefile index 7b1e5

[libav-devel] [PATCH 4/4] lavf: VAAPI scale filter

2016-02-20 Thread Mark Thompson
--- configure| 3 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_vaapi_scale.c | 575 +++ 4 files changed, 580 insertions(+) create mode 100644 libavfilter/vf_vaapi_scale.c diff --git a/co

Re: [libav-devel] [PATCH 2/4] lavu: VAAPI hwcontext implementation

2016-02-20 Thread Mark Thompson
On 20/02/16 22:46, Diego Biurrun wrote: > On Sat, Feb 20, 2016 at 06:31:01PM +0000, Mark Thompson wrote: >> --- a/libavutil/Makefile >> +++ b/libavutil/Makefile >> @@ -25,6 +25,7 @@ HEADERS = adler32.h >>

Re: [libav-devel] [PATCH 3/4] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-02-20 Thread Mark Thompson
On 20/02/16 22:49, Diego Biurrun wrote: > On Sat, Feb 20, 2016 at 06:31:43PM +0000, Mark Thompson wrote: >> --- /dev/null >> +++ b/avconv_vaapi.c >> @@ -0,0 +1,628 @@ >> + >> +#include >> +#include >> + >> +#include "avconv.h" >

[libav-devel] [PATCH] VAAPI hwcontext (+ generic hw filter support)

2016-02-25 Thread Mark Thompson
Hi, This adds generic hwupload and hwdownload filters. The device for hwupload comes from a new field in the AVFilterContext, while hwdownload just works with the HW frames context is gets from the incoming link. avconv adds support for setting the device for vaapi (via a new -vaapi_device op

[libav-devel] [PATCH 1/6] lavu: add a way to query hwcontext frame constraints

2016-02-25 Thread Mark Thompson
--- libavutil/hwcontext.c | 45 libavutil/hwcontext.h | 68 ++ libavutil/hwcontext_internal.h | 10 +++ 3 files changed, 123 insertions(+) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index b6

[libav-devel] [PATCH 2/6] lavf: generic hardware surface upload and download

2016-02-25 Thread Mark Thompson
--- libavfilter/Makefile| 2 + libavfilter/allfilters.c| 2 + libavfilter/avfilter.c | 1 + libavfilter/avfilter.h | 9 ++ libavfilter/vf_hwdownload.c | 178 ++ libavfilter/vf_hwupload.c | 227 +

[libav-devel] [PATCH 3/6] lavu: VAAPI hwcontext implementation

2016-02-25 Thread Mark Thompson
--- configure | 5 + libavutil/Makefile | 3 + libavutil/hwcontext.c | 3 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_internal.h | 1 + libavutil/hwcontext_vaapi.c| 809 + libavutil/hwco

[libav-devel] [PATCH 4/6] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-02-25 Thread Mark Thompson
--- Makefile| 1 + avconv.h| 8 + avconv_filter.c | 7 +- avconv_opt.c| 40 avconv_vaapi.c | 630 configure | 5 + 6 files changed, 690 insertions(+), 1 deletion(-) create mode 100644 avconv_vaapi.c

[libav-devel] [PATCH 5/6] lavf: VAAPI scale filter

2016-02-25 Thread Mark Thompson
--- configure| 3 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_scale_vaapi.c | 434 +++ 4 files changed, 439 insertions(+) create mode 100644 libavfilter/vf_scale_vaapi.c diff --git a/co

Re: [libav-devel] [PATCH 3/6] lavu: VAAPI hwcontext implementation

2016-02-26 Thread Mark Thompson
On 26/02/16 08:51, Diego Biurrun wrote: > On Thu, Feb 25, 2016 at 11:48:50PM +0000, Mark Thompson wrote: >> --- a/configure >> +++ b/configure >> @@ -1704,6 +1704,7 @@ CONFIG_EXTRA=" >> texturedspenc >> tpeldsp >> +vaapi_recent >>

Re: [libav-devel] [PATCH 1/6] lavu: add a way to query hwcontext frame constraints

2016-02-26 Thread Mark Thompson
On 26/02/16 11:46, wm4 wrote: > On Thu, 25 Feb 2016 23:47:39 + > Mark Thompson wrote: > >> --- >> libavutil/hwcontext.c | 45 >> libavutil/hwcontext.h | 68 >> ++ >&g

Re: [libav-devel] [PATCH 2/6] lavf: generic hardware surface upload and download

2016-02-27 Thread Mark Thompson
On 27/02/16 09:11, Anton Khirnov wrote: > Quoting Mark Thompson (2016-02-26 00:48:11) >> --- >> libavfilter/Makefile| 2 + >> libavfilter/allfilters.c| 2 + >> libavfilter/avfilter.c | 1 + >> libavfilter/avfilter.h | 9 ++ >

Re: [libav-devel] [PATCH 2/6] lavf: generic hardware surface upload and download

2016-02-28 Thread Mark Thompson
On 28/02/16 21:19, Anton Khirnov wrote: > Quoting Anton Khirnov (2016-02-28 14:20:25) >> Quoting Mark Thompson (2016-02-27 19:15:34) >>> On 27/02/16 09:11, Anton Khirnov wrote: >>>> Quoting Mark Thompson (2016-02-26 00:48:11) >>>>> +static int

[libav-devel] [PATCH] VAAPI generic hw filter support + VAAPI hwcontext and encoders

2016-03-06 Thread Mark Thompson
Hi, So, here we go again, this time with H.264 and H.265 encoders - hardware-only transcode now works :) An example command line form for hardware transcode is: ./avconv -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi_vld -i in.mp4 -an -vf hwupload,scale_vaapi=w

[libav-devel] [PATCH 2/8] lavf: generic hardware surface upload and download

2016-03-06 Thread Mark Thompson
--- libavfilter/Makefile| 2 + libavfilter/allfilters.c| 2 + libavfilter/avfilter.c | 2 + libavfilter/avfilter.h | 9 ++ libavfilter/vf_hwdownload.c | 215 + libavfilter/vf_hwupload.c | 255 ++

[libav-devel] [PATCH 1/8] lavu: add a way to query hwcontext frame constraints

2016-03-06 Thread Mark Thompson
--- libavutil/hwcontext.c | 44 +++ libavutil/hwcontext.h | 60 ++ libavutil/hwcontext_internal.h | 10 +++ 3 files changed, 114 insertions(+) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index

[libav-devel] [PATCH 3/8] lavu: VAAPI hwcontext implementation

2016-03-06 Thread Mark Thompson
--- configure | 5 + libavutil/Makefile | 13 +- libavutil/hwcontext.c | 3 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_internal.h | 1 + libavutil/hwcontext_vaapi.c| 809 + libavutil/hwc

[libav-devel] [PATCH 5/8] lavf: VAAPI scale filter

2016-03-06 Thread Mark Thompson
--- configure| 3 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_scale_vaapi.c | 448 +++ 4 files changed, 453 insertions(+) create mode 100644 libavfilter/vf_scale_vaapi.c diff --git a/co

[libav-devel] [PATCH 4/8] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-03-06 Thread Mark Thompson
--- Makefile| 1 + avconv.h| 9 + avconv_filter.c | 9 +- avconv_opt.c| 40 avconv_vaapi.c | 628 configure | 5 + 6 files changed, 691 insertions(+), 1 deletion(-) create mode 100644 avconv_vaapi.c

[libav-devel] [PATCH 6/8] lavc: VAAPI encode common infrastructure

2016-03-06 Thread Mark Thompson
--- configure | 2 + libavcodec/Makefile | 1 + libavcodec/vaapi_encode.c | 840 ++ libavcodec/vaapi_encode.h | 204 +++ 4 files changed, 1047 insertions(+) create mode 100644 libavcodec/vaapi_encode.c create mode 1006

[libav-devel] [PATCH 7/8] lavc: VAAPI H.264 encoder

2016-03-06 Thread Mark Thompson
--- configure | 3 + libavcodec/Makefile| 3 +- libavcodec/allcodecs.c | 1 + libavcodec/vaapi_encode_h264.c | 802 + libavcodec/vaapi_encode_h26x.c | 68 libavcodec/vaapi_encode_h26x.h | 70 6 files

[libav-devel] [PATCH 8/8] lavc: VAAPI H.265 encoder

2016-03-06 Thread Mark Thompson
--- configure |3 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vaapi_encode_h265.c | 1217 4 files changed, 1222 insertions(+) create mode 100644 libavcodec/vaapi_encode_h265.c dif

Re: [libav-devel] [PATCH 1/8] lavu: add a way to query hwcontext frame constraints

2016-03-07 Thread Mark Thompson
On 07/03/16 07:49, Luca Barbato wrote: > On 07/03/16 00:03, Mark Thompson wrote: >> --- >> libavutil/hwcontext.c | 44 +++ >> libavutil/hwcontext.h | 60 >> ++ >> li

[libav-devel] [PATCH] VAAPI generic hw filter support + VAAPI hwcontext and encoders

2016-03-07 Thread Mark Thompson
Hi, Here is a new run of the first half of the series. No significant changes to the second half. Notable changes: * CONFIG_VAAPI depends on libva having surface attribute support (libva >= 1.3.0). * Deprecates AV_PIX_FMT_VAAPI_*, adds AV_PIX_FMT_VAAPI covering all of them (with the same va

[libav-devel] [PATCH 1/9] lavu: add a way to query hwcontext frame constraints

2016-03-07 Thread Mark Thompson
--- libavutil/hwcontext.c | 45 +++ libavutil/hwcontext.h | 69 ++ libavutil/hwcontext_internal.h | 10 ++ 3 files changed, 124 insertions(+) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index b6d0

[libav-devel] [PATCH 2/9] lavf: generic hardware surface upload and download filters

2016-03-07 Thread Mark Thompson
--- libavfilter/Makefile| 2 + libavfilter/allfilters.c| 2 + libavfilter/avfilter.c | 2 + libavfilter/avfilter.h | 9 ++ libavfilter/vf_hwdownload.c | 212 +++ libavfilter/vf_hwupload.c | 236

[libav-devel] [PATCH 3/9] lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPI

2016-03-07 Thread Mark Thompson
--- libavcodec/h263dec.c | 2 +- libavcodec/h264_slice.c | 2 +- libavcodec/mpeg12dec.c | 2 +- libavcodec/vaapi_h264.c | 2 +- libavcodec/vaapi_mpeg2.c | 2 +- libavcodec/vaapi_mpeg4.c | 4 ++-- libavcodec/vaapi_vc1.c | 4 ++-- libavcodec/vc1dec.c | 2 +- libavutil/pixdesc.

[libav-devel] [PATCH 5/9] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-03-07 Thread Mark Thompson
--- Makefile| 1 + avconv.h| 9 + avconv_filter.c | 9 +- avconv_opt.c| 40 avconv_vaapi.c | 628 configure | 5 + 6 files changed, 691 insertions(+), 1 deletion(-) create mode 100644 avconv_vaapi.c

[libav-devel] [PATCH 4/9] lavu: VAAPI hwcontext implementation

2016-03-07 Thread Mark Thompson
--- configure | 4 + libavutil/Makefile | 3 + libavutil/hwcontext.c | 3 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_internal.h | 1 + libavutil/hwcontext_vaapi.c| 822 + libavutil/hwco

Re: [libav-devel] [PATCH 3/9] lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPI

2016-03-08 Thread Mark Thompson
On 08/03/16 09:20, Diego Biurrun wrote: > On Mon, Mar 07, 2016 at 11:21:00PM +0000, Mark Thompson wrote: >> --- >> libavcodec/h263dec.c | 2 +- >> libavcodec/h264_slice.c | 2 +- >> libavcodec/mpeg12dec.c | 2 +- >> libavcodec/vaapi_h264.c | 2 +-

Re: [libav-devel] [PATCH 4/9] lavu: VAAPI hwcontext implementation

2016-03-08 Thread Mark Thompson
On 08/03/16 09:25, Diego Biurrun wrote: > On Mon, Mar 07, 2016 at 11:21:45PM +0000, Mark Thompson wrote: >> --- /dev/null >> +++ b/libavutil/hwcontext_vaapi.c >> @@ -0,0 +1,822 @@ >> + >> +// On current Intel drivers, derive gives you memory which is very

Re: [libav-devel] [PATCH 2/9] lavf: generic hardware surface upload and download filters

2016-03-10 Thread Mark Thompson
On 10/03/16 00:37, Timothy Gu wrote: > On Mon, Mar 07, 2016 at 11:20:14PM +0000, Mark Thompson wrote: >> +AVFilter ff_vf_hwdownload = { >> +.name = "hwdownload", >> +.description = NULL_IF_CONFIG_SMALL("Upload a normal frame to a >> h

Re: [libav-devel] [PATCH 4/9] lavu: VAAPI hwcontext implementation

2016-03-10 Thread Mark Thompson
On 10/03/16 14:27, Anton Khirnov wrote: > Quoting Mark Thompson (2016-03-08 00:21:45) >> --- >> configure | 4 + >> libavutil/Makefile | 3 + >> libavutil/hwcontext.c | 3 + >> libavutil/hwcontext

Re: [libav-devel] [PATCH 4/9] lavu: VAAPI hwcontext implementation

2016-03-10 Thread Mark Thompson
On 10/03/16 16:16, Anton Khirnov wrote: > Quoting Mark Thompson (2016-03-10 16:56:21) >>>> +++avfc->nb_surfaces; >>>> +if (avfc->nb_surfaces == 1) { >>>> +// Test whether vaDeriveImage() works for this type of surface.

[libav-devel] [PATCH 0/9] Generic hw filter support + VAAPI hwcontext and encoders

2016-03-15 Thread Mark Thompson
Hi all, Whole series follows again. Changes since last time: * APIchanges added where appropriate. * Memory allocation cleaned up; now valgrind-clean for normal use (might still be some leaks in error cases). * Some compatibility fixes for older libva (tested on 1.3.0 in Ubuntu 14.04 LTS).

[libav-devel] [PATCH 1/9] lavu: add a way to query hwcontext frame constraints

2016-03-15 Thread Mark Thompson
--- doc/APIchanges | 3 ++ libavutil/hwcontext.c | 45 +++ libavutil/hwcontext.h | 69 ++ libavutil/hwcontext_internal.h | 10 ++ 4 files changed, 127 insertions(+) diff --git a/doc/APIchanges b

[libav-devel] [PATCH 2/9] lavf: generic hardware surface upload and download

2016-03-15 Thread Mark Thompson
--- libavfilter/Makefile| 2 + libavfilter/allfilters.c| 2 + libavfilter/avfilter.c | 2 + libavfilter/avfilter.h | 9 ++ libavfilter/vf_hwdownload.c | 212 ++ libavfilter/vf_hwupload.c | 241 +

[libav-devel] [PATCH 3/9] lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPI

2016-03-15 Thread Mark Thompson
--- doc/APIchanges | 4 libavcodec/h263dec.c | 2 +- libavcodec/h264_slice.c | 2 +- libavcodec/mpeg12dec.c | 2 +- libavcodec/vaapi_h264.c | 2 +- libavcodec/vaapi_mpeg2.c | 2 +- libavcodec/vaapi_mpeg4.c | 4 ++-- libavcodec/vaapi_vc1.c | 4 ++-- libavcodec/vc1de

[libav-devel] [PATCH 4/9] lavu: VAAPI hwcontext implementation

2016-03-15 Thread Mark Thompson
--- configure | 4 + doc/APIchanges | 3 + libavutil/Makefile | 3 + libavutil/hwcontext.c | 3 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_internal.h | 1 + libavutil/hwcontext_vaapi.c| 850 +

[libav-devel] [PATCH 5/9] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-03-15 Thread Mark Thompson
--- Makefile| 1 + avconv.c| 2 + avconv.h| 9 + avconv_filter.c | 9 +- avconv_opt.c| 41 avconv_vaapi.c | 626 configure | 5 + 7 files changed, 692 insertions(+), 1 deletion(-) create mo

[libav-devel] [PATCH 6/9] lavf: VAAPI scale filter

2016-03-15 Thread Mark Thompson
--- configure| 3 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_scale_vaapi.c | 451 +++ 4 files changed, 456 insertions(+) create mode 100644 libavfilter/vf_scale_vaapi.c diff --git a/co

[libav-devel] [PATCH 7/9] lavc: VAAPI encode common infrastructure

2016-03-15 Thread Mark Thompson
--- configure | 2 + libavcodec/Makefile | 1 + libavcodec/vaapi_encode.c | 951 ++ libavcodec/vaapi_encode.h | 203 ++ 4 files changed, 1157 insertions(+) create mode 100644 libavcodec/vaapi_encode.c create mode 10064

[libav-devel] [PATCH 8/9] lavc: VAAPI H.264 encoder

2016-03-15 Thread Mark Thompson
--- configure | 3 + libavcodec/Makefile| 3 +- libavcodec/allcodecs.c | 1 + libavcodec/vaapi_encode_h264.c | 802 + libavcodec/vaapi_encode_h26x.c | 68 libavcodec/vaapi_encode_h26x.h | 70 6 files

[libav-devel] [PATCH 9/9] lavc: VAAPI H.265 encoder

2016-03-15 Thread Mark Thompson
--- configure |3 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vaapi_encode_h265.c | 1217 4 files changed, 1222 insertions(+) create mode 100644 libavcodec/vaapi_encode_h265.c dif

Re: [libav-devel] [PATCH 7/9] lavc: VAAPI encode common infrastructure

2016-03-18 Thread Mark Thompson
On 17/03/16 20:48, Mark Thompson wrote: > On 17/03/16 10:47, Diego Biurrun wrote: >> On Tue, Mar 15, 2016 at 11:00:39PM +0000, Mark Thompson wrote: >>> --- a/configure >>> +++ b/configure >>> @@ -1874,6 +1875,7 @@ nvenc_deps_any="dlopen LoadLibrary"

Re: [libav-devel] [PATCH 7/9] lavc: VAAPI encode common infrastructure

2016-03-19 Thread Mark Thompson
On 17/03/16 10:47, Diego Biurrun wrote: > On Tue, Mar 15, 2016 at 11:00:39PM +0000, Mark Thompson wrote: >> --- a/configure >> +++ b/configure >> @@ -1874,6 +1875,7 @@ nvenc_deps_any="dlopen LoadLibrary" >> nvenc_extralibs='$ldl'

Re: [libav-devel] [PATCH 6/9] lavf: VAAPI scale filter

2016-03-19 Thread Mark Thompson
On 19/03/16 08:47, Anton Khirnov wrote: > Quoting Mark Thompson (2016-03-16 00:00:09) >> + >> +static int scale_vaapi_pipeline_uninit(ScaleVAAPIContext *ctx) >> +{ >> +if (ctx->va_context != VA_INVALID_ID) { > > Some tests reveal that these checks are not

[libav-devel] [PATCH 0/6] VAAPI avconv support and encoders

2016-03-20 Thread Mark Thompson
Hi, Next parts of the VAAPI support series follows, now concentrating on encoding. Changes: * Removed FF prefix from internal types. * Added CAP_DELAY to the encoders which take B-frames - now drains frames correctly at the end of the stream. * DTS generation now works. * Fixed QP mode now r

[libav-devel] [PATCH 1/6] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-03-20 Thread Mark Thompson
--- Makefile| 1 + avconv.c| 2 + avconv.h| 9 + avconv_filter.c | 9 +- avconv_opt.c| 41 avconv_vaapi.c | 626 configure | 5 + 7 files changed, 692 insertions(+), 1 deletion(-) create mo

[libav-devel] [PATCH 2/6] lavf: VAAPI scale filter

2016-03-20 Thread Mark Thompson
--- configure| 3 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_scale_vaapi.c | 460 +++ 4 files changed, 465 insertions(+) create mode 100644 libavfilter/vf_scale_vaapi.c diff --git a/co

[libav-devel] [PATCH 3/6] lavc: VAAPI encode common infrastructure

2016-03-20 Thread Mark Thompson
--- configure |2 + libavcodec/Makefile |1 + libavcodec/vaapi_encode.c | 1086 + libavcodec/vaapi_encode.h | 218 + 4 files changed, 1307 insertions(+) create mode 100644 libavcodec/vaapi_encode.c create mode 100

[libav-devel] [PATCH 4/6] lavc: VAAPI H.264 encoder

2016-03-20 Thread Mark Thompson
--- configure | 3 + libavcodec/Makefile| 3 +- libavcodec/allcodecs.c | 1 + libavcodec/vaapi_encode_h264.c | 817 + libavcodec/vaapi_encode_h26x.c | 68 libavcodec/vaapi_encode_h26x.h | 70 6 files

[libav-devel] [PATCH 5/6] lavc: VAAPI H.265 encoder

2016-03-20 Thread Mark Thompson
--- configure |3 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vaapi_encode_h265.c | 1235 4 files changed, 1240 insertions(+) create mode 100644 libavcodec/vaapi_encode_h265.c dif

[libav-devel] [PATCH 6/6] lavc: VAAPI MJPEG encoder

2016-03-20 Thread Mark Thompson
--- configure | 3 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/vaapi_encode_mjpeg.c | 419 4 files changed, 424 insertions(+) create mode 100644 libavcodec/vaapi_encode_mjpeg.c dif

Re: [libav-devel] [PATCH 1/6] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-03-21 Thread Mark Thompson
On 21/03/16 12:16, Diego Biurrun wrote: > On Mon, Mar 21, 2016 at 12:02:41AM +0000, Mark Thompson wrote: >> --- /dev/null >> +++ b/avconv_vaapi.c >> @@ -0,0 +1,626 @@ >> + >> +static void vaapi_device_uninit(AVHWDeviceContext *hwdev) >> +{ >> +} >

Re: [libav-devel] [PATCH 4/6] lavc: VAAPI H.264 encoder

2016-03-21 Thread Mark Thompson
On 21/03/16 12:29, Diego Biurrun wrote: > On Mon, Mar 21, 2016 at 12:04:23AM +0000, Mark Thompson wrote: >> --- a/libavcodec/Makefile >> +++ b/libavcodec/Makefile >> @@ -105,7 +105,7 @@ OBJS-$(CONFIG_STARTCODE) += startcode.o >> OBJS-$(CONFIG_TEXTUREDSP)

Re: [libav-devel] [PATCH 6/6] lavc: VAAPI MJPEG encoder

2016-03-21 Thread Mark Thompson
On 21/03/16 12:35, Diego Biurrun wrote: > On Mon, Mar 21, 2016 at 12:05:59AM +0000, Mark Thompson wrote: >> --- /dev/null >> +++ b/libavcodec/vaapi_encode_mjpeg.c >> @@ -0,0 +1,419 @@ >> + >> +static void vaapi_encode_mjpeg_init_tables(AVCodecContext *avctx) >

Re: [libav-devel] [PATCH 7/9] lavc: VAAPI encode common infrastructure

2016-03-21 Thread Mark Thompson
On 21/03/16 13:02, Diego Biurrun wrote: > On Mon, Mar 21, 2016 at 12:47:46PM +0000, Mark Thompson wrote: >> Referring back to a previous response, can you offer any guidance about how >> you >> think the "vaapi", "vaapi_encode" etc. config options sh

[libav-devel] [PATCH 0/6] VAAPI avconv support and encoders

2016-03-23 Thread Mark Thompson
Hi, Another iteration. Interesting changes: * Added some simple default settings for each encoder. * DTS generation cleaned up a bit; output and decode delays are now minimal. * Dropped debug tracing from H.26x bitstream writing. * Added missing build dependencies, encoders can now build alon

[libav-devel] [PATCH 1/5] avconv: VAAPI hwcontext initialisation and hwaccel helper

2016-03-23 Thread Mark Thompson
--- Makefile| 1 + avconv.c| 2 + avconv.h| 9 + avconv_filter.c | 9 +- avconv_opt.c| 41 avconv_vaapi.c | 626 configure | 8 +- 7 files changed, 694 insertions(+), 2 deletions(-) create

[libav-devel] [PATCH 2/5] lavc: VAAPI encode common infrastructure

2016-03-23 Thread Mark Thompson
--- configure |2 + libavcodec/Makefile |1 + libavcodec/vaapi_encode.c | 1096 + libavcodec/vaapi_encode.h | 217 + 4 files changed, 1316 insertions(+) create mode 100644 libavcodec/vaapi_encode.c create mode 100

[libav-devel] [PATCH 3/5] lavc: VAAPI H.264 encoder

2016-03-23 Thread Mark Thompson
--- configure | 3 + libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/vaapi_encode_h264.c | 847 + libavcodec/vaapi_encode_h26x.c | 68 libavcodec/vaapi_encode_h26x.h | 45 +++ 6 files c

[libav-devel] [PATCH 4/5] lavc: VAAPI H.265 encoder

2016-03-23 Thread Mark Thompson
--- configure |3 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vaapi_encode_h265.c | 1257 4 files changed, 1262 insertions(+) create mode 100644 libavcodec/vaapi_encode_h265.c dif

[libav-devel] [PATCH 5/5] lavc: VAAPI MJPEG encoder

2016-03-23 Thread Mark Thompson
--- configure | 3 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/vaapi_encode_mjpeg.c | 420 4 files changed, 425 insertions(+) create mode 100644 libavcodec/vaapi_encode_mjpeg.c dif

Re: [libav-devel] [PATCH] rtpdec_jpeg: fix low contrast image on low quality setting

2016-03-25 Thread Mark Thompson
On 25/03/16 08:44, Martin Storsjö wrote: > From: Ico Doornekamp > > The problem is that the argument 'q' is of the type uint8_t. > According to the JPEG standard, if 1 <= q <= 50, the scale factor > 'S' should be 5000 / Q. Because the create_default_qtables() reuses > the variable 'q' to store th

Re: [libav-devel] [PATCH] avconv: fix -frames for video

2016-03-27 Thread Mark Thompson
On 27/03/16 13:26, Anton Khirnov wrote: > For video, frame_number tracks the number of frames sent to the encoder. > So it should be incremented when we submit a frame, not when we get a > packet back. > --- > avconv.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) Code cha

Re: [libav-devel] [PATCH] avconv: fix -frames for video

2016-03-28 Thread Mark Thompson
On 28/03/16 08:15, Anton Khirnov wrote: > Quoting Mark Thompson (2016-03-27 17:26:43) >> On 27/03/16 13:26, Anton Khirnov wrote: >>> For video, frame_number tracks the number of frames sent to the encoder. >>> So it should be incremented when we submit a frame, not wh

Re: [libav-devel] [PATCH] build: Do not check the vaapi_encode.h header if VAAPI is not enabled

2016-03-30 Thread Mark Thompson
On 30/03/16 16:52, Diego Biurrun wrote: > --- > libavcodec/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/Makefile b/libavcodec/Makefile > index 3d464b8..38c7c5a 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -781,7 +781,7 @@ SKIP

[libav-devel] [PATCH] vaapi_h264: Fix bit offset of slice data.

2016-04-02 Thread Mark Thompson
Commit ca2f19b9cc37be509d85f05c8f902860475905f8 modified the meaning of H264SliceContext.gb: it is now initialised at the start of the NAL unit header, rather than at the start of the slice header. The VAAPI slice decoder uses the offset after parsing to determine the offset of the slice data in t

[libav-devel] [PATCH 0/6] VAAPI H.264 constant-bitrate encode support, other oddments

2016-04-09 Thread Mark Thompson
Hi all, Interesting additions in this series: * Adds constant-bitrate encode support for H.264 (no H.265 yet, I need to read more of the Intel driver to work out what random options are stopping it from working). * Adds a local option -qp for H.26[45] constant-QP mode rather than using -glob

[libav-devel] [PATCH 1/6] vaapi_encode: Refactor slightly to allow easier setting of global options

2016-04-09 Thread Mark Thompson
--- libavcodec/vaapi_encode.c | 13 + libavcodec/vaapi_encode.h | 10 -- libavcodec/vaapi_encode_h264.c | 30 -- libavcodec/vaapi_encode_h265.c | 40 libavcodec/vaapi_encode_mjpeg.c | 22

[libav-devel] [PATCH 2/6] vaapi_h264: Add constant-bitrate encode suppor

2016-04-09 Thread Mark Thompson
--- libavcodec/vaapi_encode_h264.c | 99 -- 1 file changed, 75 insertions(+), 24 deletions(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 6a77ab1..a00d478 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/va

[libav-devel] [PATCH 3/6] vaapi_encode: Add per-codec options, use them to add local -qp option to H.26[45] for constant-QP mode

2016-04-09 Thread Mark Thompson
--- libavcodec/vaapi_encode.h | 1 + libavcodec/vaapi_encode_h264.c | 21 ++--- libavcodec/vaapi_encode_h265.c | 21 ++--- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h index 9716578..163e

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