Re: [libav-devel] [PATCH 1/5] vaapi_h264: Add support for VUI parameters

2016-06-09 Thread Mark Thompson
On 09/06/16 08:10, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-01 00:29:19) >> Supports aspect ratio, colour format and timing information. >> --- >> libavcodec/vaapi_encode_h264.c | 126 >> - >> 1 file change

Re: [libav-devel] [PATCH 5/5] vaapi_h265: cu_qp_delta should not be used in constant-QP mode

2016-06-09 Thread Mark Thompson
On 09/06/16 08:39, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-01 00:40:03) >> --- >> This field started as 0 and the bitrate-targetting set changed it to 1: it >> should be conditional on the mode because the feature is just wasting bits >> with con

[libav-devel] [PATCH 2/2] vaapi_encode: Respect driver quirks around buffer destruction

2016-06-12 Thread Mark Thompson
No longer leaks memory when used with a driver with the "render does not destroy param buffers" quirk (i.e. Intel i965). --- libavcodec/vaapi_encode.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c

[libav-devel] [PATCH 1/2] hwcontext_vaapi: Add driver quirks to the hwdevice

2016-06-12 Thread Mark Thompson
The driver being used is detected inside av_hwdevice_ctx_init(), and the quirks field then set from a table of known drivers. Also adds the Intel i965 driver quirk (it does not destroy parameter buffers used in a call to vaRenderPicture()) and detects that driver to set it. --- Another

[libav-devel] [PATCH] vaapi_encode: Add driver-specific behaviour for i965 param buffers

2016-06-09 Thread Mark Thompson
Adds a general mechanism for setting driver quirks, and detects the driver name to set them. When the i965 driver is being used, destroy all parameter buffers explicitly after use despite passing them to vaRenderPicture(). --- An alternative approach to solving the same problem as the previous

[libav-devel] [PATCH] vaapi_encode: Free parameter buffers despite calling vaRenderPicture

2016-06-09 Thread Mark Thompson
The i965 driver does not free these buffers as required by VAAPI, so we have to do this ourselves if we want to support encoding sessions which run indefinitely. Since this changes our behaviour to be inconsistent with the specification, also add an extra test on startup to detect non-i965

Re: [libav-devel] [PATCH] vaapi_encode: Add driver-specific behaviour for i965 param buffers

2016-06-10 Thread Mark Thompson
On 10/06/16 08:06, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-10 01:25:58) >> Adds a general mechanism for setting driver quirks, and detects the >> driver name to set them. >> >> When the i965 driver is being used, destroy all parameter buffers >> exp

Re: [libav-devel] [PATCH] libavcodec/options.c: handle hw_frames_ctx where necessary

2016-05-24 Thread Mark Thompson
On 22/05/16 21:31, Andrey Turkin wrote: > > avcodec_copy_context didn't handle hw_frames_ctx references > correctly which could cause crashes. > --- > libavcodec/options.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/libavcodec/options.c b/libavcodec/options.c > index

Re: [libav-devel] [PATCH] vaapi_encode: Add driver-specific behaviour for i965 param buffers

2016-06-14 Thread Mark Thompson
On 14/06/16 06:02, Gwenole Beauchesne wrote: > Hi, > > 2016-06-10 10:49 GMT+02:00 Mark Thompson <s...@jkqxz.net>: >> On 10/06/16 08:06, Anton Khirnov wrote: >>> Quoting Mark Thompson (2016-06-10 01:25:58) >>>> Adds a general mechanism for setting drive

[libav-devel] [PATCH 1/5] vaapi_h264: Add support for VUI parameters

2016-05-31 Thread Mark Thompson
Supports aspect ratio, colour format and timing information. --- libavcodec/vaapi_encode_h264.c | 126 - 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 2341b12..139e6e9

[libav-devel] [PATCH 2/5] vaapi_encode: Add support for writing arbitrary additional packed headers

2016-05-31 Thread Mark Thompson
--- This was first submitted a while ago but ignored due to lack of use. Following patches in this series will now use it. libavcodec/vaapi_encode.c | 21 + libavcodec/vaapi_encode.h | 4 2 files changed, 25 insertions(+) diff --git a/libavcodec/vaapi_encode.c

[libav-devel] [PATCH 3/5] vaapi_h264: Add support for SEI messages

2016-05-31 Thread Mark Thompson
Send buffering_period and pic_timing messages when in modes targetting bitrate. Also adds NAL HRD parameters to VUI. --- Not sure about the strict conformance of the result of this, but I believe it's now all doing the right thing. libavcodec/vaapi_encode_h264.c | 209

[libav-devel] [PATCH 4/5] vaapi_h264: Add source version identifier as unregistered SEI

2016-05-31 Thread Mark Thompson
Contains the libavcodec version, the VAAPI version and the libva driver vendor string. --- Nice to put this in streams so that you can see where they came from; certainly good for debugging if it ever makes broken streams. I haven't tried to fill in the actual codec parameters like x264 does: it

[libav-devel] [PATCH 5/5] vaapi_h265: cu_qp_delta should not be used in constant-QP mode

2016-05-31 Thread Mark Thompson
--- This field started as 0 and the bitrate-targetting set changed it to 1: it should be conditional on the mode because the feature is just wasting bits with constant-QP. libavcodec/vaapi_encode_h265.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [libav-devel] [PATCH 3/5] vaapi_h264: Add support for SEI messages

2016-05-31 Thread Mark Thompson
On 31/05/16 23:33, Mark Thompson wrote: > Send buffering_period and pic_timing messages when in modes > targetting bitrate. Also adds NAL HRD parameters to VUI. > ... > +priv->dpb_delay = !!avctx->max_b_frames; Not sure what I was thinking here (encode delay isn't the

[libav-devel] [PATCH 3/5] vaapi_h264: Add support for SEI messages

2016-06-01 Thread Mark Thompson
Send buffering_period and pic_timing messages when in modes targetting bitrate. Also adds NAL HRD parameters to VUI. --- Fixed dpb_output_delay. libavcodec/vaapi_encode_h264.c | 207 - 1 file changed, 206 insertions(+), 1 deletion(-) diff --git

Re: [libav-devel] [PATCH 1/2] hwcontext_vaapi: Add driver quirks to the hwdevice

2016-06-17 Thread Mark Thompson
On 17/06/16 09:46, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-12 19:03:54) >> The driver being used is detected inside av_hwdevice_ctx_init(), and >> the quirks field then set from a table of known drivers. >> >> Also adds the Intel i965 driver quirk (it

[libav-devel] [PATCH 1/3] hwcontext_vaapi: Add driver quirks to the hwdevice

2016-06-21 Thread Mark Thompson
The driver being used is detected inside av_hwdevice_ctx_init(), and the quirks field then set from a table of known drivers. Also adds the Intel i965 driver quirk (it does not destroy parameter buffers used in a call to vaRenderPicture()) and detects that driver to set it. --- Not-quite-as-long

[libav-devel] [PATCH 2/3] vaapi_encode: Respect driver quirks around buffer destruction

2016-06-21 Thread Mark Thompson
No longer leaks memory when used with a driver with the "render does not destroy param buffers" quirk (i.e. Intel i965). --- libavcodec/vaapi_encode.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c

[libav-devel] [PATCH 3/3] vaapi_encode: Maintain a pool of bitstream output buffers

2016-06-21 Thread Mark Thompson
Previously we would allocate a new one for every frame. This instead maintains an AVBufferPool of them to use as-needed. Also makes the maximum size of an output buffer adapt to the frame size - the fixed upper bound was a bit too easy to hit when encoding large pictures at high quality. ---

Re: [libav-devel] [PATCH 07/10] avconv: do packet ts rescaling in write_packet()

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > This will be useful in the following commit, after which the muxer > timebase is not always available when encoding. > --- > avconv.c | 23 --- > avconv.h | 2 ++ > 2 files changed, 14 insertions(+), 11 deletions(-) > ... > @@ -314,7

Re: [libav-devel] [PATCH 05/10] avconv: factor out initializing stream parameters for encoding

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > Setting the filter input parameters is moved to init_input_stream(), > so that it is done before the decoder is opened, potentially overwriting > the information from avformat_find_stream_info() with less accurate > data. > > This commit temporarily

Re: [libav-devel] [PATCH 06/10] avconv: decouple configuring filtergraphs and setting output parameters

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > The reasoning is the same as in 563aa6b80bf87712910404d6fb5495a75e40ae86 > --- > avconv.c| 3 +++ > avconv.h| 12 +++ > avconv_filter.c | 50 +- > avconv_opt.c| 62 >

Re: [libav-devel] [PATCH 08/10] avconv: init filtergraphs only after we have a frame on each input

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > This makes sure the actual stream parameters are used, which is > important mainly for hardware decoding+filtering cases, which would > previously require various weird workarounds to handle the fact that a > fake software graph has to be constructed, but

Re: [libav-devel] [PATCH 01/10] lavfi: set the link hwframes context before configuring the dst input

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > The destination filter might expect the hw frames context to be already > set (this is the case e.g. for hwdownload). > --- > libavfilter/avfilter.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) OK. (Though the diff would be

Re: [libav-devel] [PATCH 02/10] avconv: explicitly postpone writing the header until all streams are initialized

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > This should have no practical effect for now, but will make a difference > in the following commits. > --- > avconv.c | 97 > +--- > avconv.h | 8 ++ > 2 files changed, 71 insertions(+), 34

Re: [libav-devel] [PATCH 03/10] avconv: buffer the packets written while the muxer is not initialized

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > --- > avconv.c| 76 > +++-- > avconv.h| 7 ++ > avconv_opt.c| 10 > doc/avconv.texi | 9 +++ > 4 files changed, 84 insertions(+), 18 deletions(-) The

Re: [libav-devel] [PATCH 04/10] avconv: decouple configuring filtergraphs and setting input parameters

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > Currently, calling configure_filtergraph() will pull in the input > parameters from the corresponding decoder context. This has the > following disadvantages: > - the decoded frame is a more proper source for this information > - a filter accessing decoder

Re: [libav-devel] [PATCH 09/10] avconv: pass the hwaccel frames context to the decoder

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > --- > avconv.c | 7 +++ > 1 file changed, 7 insertions(+) OK. Probably we should consider how this setup should be working in the non-hwaccel decoder case soon. - Mark ___ libav-devel mailing list

Re: [libav-devel] [PATCH 10/10] avconv_qsv: use the device creation API

2016-06-22 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > --- > avconv_qsv.c | 247 > +-- > 1 file changed, 38 insertions(+), 209 deletions(-) Yay, qsv_transcode_init() is gone :) LGTM. - Mark ___ libav-devel

[libav-devel] [PATCH] avconv: Remove hw_device_ctx output filter reinit hack

2016-06-22 Thread Mark Thompson
Not needed any more because we no longer have any useful case which will reinitialise with hardware frames here. --- To go on top of Anton's avconv series. This was always a nasty hack because it could break stream changes with non-hardware streams when a hardware device was present. Now that

Re: [libav-devel] [PATCH 03/10] avconv: buffer the packets written while the muxer is not initialized

2016-06-23 Thread Mark Thompson
On 21/06/16 18:50, Anton Khirnov wrote: > --- > avconv.c| 76 > +++-- > avconv.h| 7 ++ > avconv_opt.c| 10 > doc/avconv.texi | 9 +++ > 4 files changed, 84 insertions(+), 18 deletions(-) Is

[libav-devel] [PATCH 1/2] vaapi_encode: Fix fallback when input does not match any format

2016-06-18 Thread Mark Thompson
Just a typo. Add a comment to make it clearer what it's doing. --- libavcodec/vaapi_encode.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 45f5e57..c3f4e44 100644 --- a/libavcodec/vaapi_encode.c +++

[libav-devel] [PATCH 2/2] hwcontext_vaapi: Return all formats for constraints without config

2016-06-18 Thread Mark Thompson
No longer make a dummy device configuration to query. Instead, just return everything we recognise from the whole format list. Also change the device setup code to query that list only, rather than intersecting it with the constraint output. This makes hwupload more usable on mesa/gallium where

Re: [libav-devel] [PATCH 3/3] vaapi_encode: Maintain a pool of bitstream output buffers

2016-06-26 Thread Mark Thompson
On 23/06/16 21:13, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-22 00:28:31) >> Previously we would allocate a new one for every frame. This instead >> maintains an AVBufferPool of them to use as-needed. >> >> Also makes the maximum size of an output buffer

Re: [libav-devel] [PATCH 07/10] avconv: do packet ts rescaling in write_packet()

2016-06-26 Thread Mark Thompson
On 25/06/16 11:00, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-23 01:12:14) >> On 21/06/16 18:50, Anton Khirnov wrote: >>> This will be useful in the following commit, after which the muxer >>> timebase is not always available when encoding.

Re: [libav-devel] [PATCH 4/4] hwcontext_vaapi: allow transfers to/from any size of sw frame

2016-06-26 Thread Mark Thompson
On 25/06/16 22:04, Luca Barbato wrote: > On 25/06/16 16:19, Anton Khirnov wrote: >> From: Mark Thompson <s...@jkqxz.net> >> >> The hw frame used as reference has an attached size but it need not >> match the actual size of the surface, so enforcing that the sw fra

[libav-devel] [PATCH] hwcontext_vaapi: Add driver quirks to the hwdevice

2016-06-26 Thread Mark Thompson
to vaRenderPicture()) and detects that driver to set it. --- On 23/06/16 20:54, Anton Khirnov wrote: > Quoting Mark Thompson (2016-06-22 00:26:49) >> Do we want an explicit way to disable the autodetection and let the >> user set the quirks field? Currently it works for t

Re: [libav-devel] [PATCH 1/4] hwcontext: clarify the behaviour of transfer_data() for cropped frames

2016-06-26 Thread Mark Thompson
On 25/06/16 15:19, Anton Khirnov wrote: > hwcontext: clarify the behaviour of transfer_data() for cropped frames > hwcontext: allocate the destination frame for the pool size > vf_hwdownload: allocate the destination frame for the pool size > hwcontext_vaapi: allow transfers to/from any size of sw

[libav-devel] [PATCH] vf_scale_vaapi: Respect driver quirks around buffer destruction

2016-06-26 Thread Mark Thompson
--- And we need this one too. Destroy was already present - following existing examples without reading the documentation properly is a good way to propagate errors. libavfilter/vf_scale_vaapi.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git

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

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

[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

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

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 <s...@jkqxz.net> wrote: > >> --- >> libavutil/hwcontext.c | 45 >> libavutil/hwcontext.h | 68 >> +

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 ++ >

[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

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

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

[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

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 <s...@jkqxz.net> wrote: >> ... >> +MAP(NV12, YUV420, NV12), >> +MAP(IYUV, YUV420, YUV420P), >> +MAP(YV12, YUV420, YUV420P), // With U/V planes swapped. >> +

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 enume

[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

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

[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

[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

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" >

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

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

[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

[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

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"

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

[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

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

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

[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

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' >>

[libav-devel] [PATCH 4/8] vaapi_h264: Add -qp option, use it to replace use of -global_quality

2016-04-12 Thread Mark Thompson
--- libavcodec/vaapi_encode_h264.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index df4c169..940832e 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@

[libav-devel] [PATCH 5/8] vaapi_h264: Add encode quality option (for quality-speed tradeoff)

2016-04-12 Thread Mark Thompson
Only supported on VAAPI 0.36 and higher. --- libavcodec/vaapi_encode_h264.c | 28 1 file changed, 28 insertions(+) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 940832e..9841a70 100644 --- a/libavcodec/vaapi_encode_h264.c +++

[libav-devel] [PATCH 6/8] vaapi_encode: Add support for writing arbitrary additional packed headers

2016-04-12 Thread Mark Thompson
--- libavcodec/vaapi_encode.c | 21 + libavcodec/vaapi_encode.h | 4 2 files changed, 25 insertions(+) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index c80e638..c45bbed 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@

[libav-devel] [PATCH 7/8] vaapi_h265: Add constant-bitrate encode support

2016-04-12 Thread Mark Thompson
--- libavcodec/vaapi_encode_h265.c | 132 ++--- 1 file changed, 109 insertions(+), 23 deletions(-) diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 323efd4..128b5a5 100644 --- a/libavcodec/vaapi_encode_h265.c +++

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

2016-04-12 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/8] vaapi_h264: Add constant-bitrate encode support

2016-04-12 Thread Mark Thompson
--- libavcodec/vaapi_encode_h264.c | 135 + 1 file changed, 110 insertions(+), 25 deletions(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 6a77ab1..df4c169 100644 --- a/libavcodec/vaapi_encode_h264.c +++

[libav-devel] [PATCH 3/8] vaapi_encode: Add support for codec-local options

2016-04-12 Thread Mark Thompson
--- libavcodec/vaapi_encode.c | 1 + libavcodec/vaapi_encode.h | 5 + 2 files changed, 6 insertions(+) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index b1f0069..c80e638 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -905,6 +905,7 @@ av_cold

[libav-devel] [PATCH 0/8] VAAPI constant-bitrate encode support, related oddments

2016-04-12 Thread Mark Thompson
Hi all, Series v2 follows. Changes: * The initialisation for constant-bitrate vs. fixed-qp has been split into separate functions. * Constant-bitrate modes now use rc_buffer_size/rc_initial_buffer_occupancy if set. * Timing uses AVCodecContext.framerate if present, otherwise time_base. *

[libav-devel] [PATCH 8/8] vaapi_h265: Add -qp option, use it to replace use of -global_quality

2016-04-12 Thread Mark Thompson
--- libavcodec/vaapi_encode_h265.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 128b5a5..917268a 100644 --- a/libavcodec/vaapi_encode_h265.c +++ b/libavcodec/vaapi_encode_h265.c @@

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

[libav-devel] [PATCH 5/6] vaapi_encode: Add support for writing arbitrary additional packed headers

2016-04-09 Thread Mark Thompson
--- libavcodec/vaapi_encode.c | 21 + libavcodec/vaapi_encode.h | 4 2 files changed, 25 insertions(+) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index b1f0069..d596c6a 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@

[libav-devel] [PATCH 6/6] vaapi_h264: Write a zero-length SEI packed header on every frame

2016-04-09 Thread Mark Thompson
The Intel driver unhelpfully injects SEI messages which the user didn't ask for into the stream when in constant-bitrate mode. This change disables that "feature" by writing a zero-length SEI packed header which the driver will then use instead of its version. --- libavcodec/vaapi_encode_h264.c

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

2016-04-09 Thread Mark Thompson
On 09/04/16 17:16, Mark Thompson wrote: > $SUBJECT Oops, stupid typo fixed. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

[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

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

[libav-devel] [PATCH 4/6] vaapi_h264: Add encode quality option (for quality-speed tradeoff)

2016-04-09 Thread Mark Thompson
--- libavcodec/vaapi_encode_h264.c | 20 1 file changed, 20 insertions(+) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 5ab43cf..347dc90 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -113,9 +113,16 @@

Re: [libav-devel] [PATCH v2 2/3] omx: Add support for broadcom OMX on raspberry pi

2016-04-09 Thread Mark Thompson
On 07/04/16 12:43, Martin Storsjö wrote: > ... > @@ -4608,7 +4610,15 @@ enabled mmal && { check_lib > interface/mmal/mmal.h mmal_port_connect > check_lib interface/mmal/mmal.h > mmal_port_connect ; } > check_lib

  1   2   3   4   5   6   7   8   9   10   >