Re: [FFmpeg-devel] [PATCH] vaapi_encode_h26[45]: Reject bitrate targets higher than 2^31

2016-06-02 Thread Mark Thompson
On 02/06/16 22:00, Matthieu Bouron wrote: > On Thu, Jun 02, 2016 at 07:13:39PM +0100, Mark Thompson wrote: >> --- >> ... something like this. >> >> libavcodec/vaapi_encode_h264.c | 6 ++ >> libavcodec/vaapi_encode_h265.c | 6 ++ >> 2 files cha

Re: [FFmpeg-devel] [PATCH] vaapi_encode: explicitly free buffers after vaEndPicture

2016-06-08 Thread Mark Thompson
On 08/06/16 18:23, Will Kelleher wrote: > Hi all - > > I'm experiencing some significant heap growth when encoding with VAAPI on > my Ivy Bridge hardware. Based on what I'm seeing from Massif, it seems like > the parameter buffers allocated in vaapi_encode_make_param_buffer are leaking. > > I

Re: [FFmpeg-devel] [PATCH 0/5] avutil/qsv add hwcontext_qsv

2016-06-06 Thread Mark Thompson
On 06/06/16 09:25, nablet developer wrote: > ping. any feedback? Perhaps you could comment on the merits and functionality of your version as compared with the one here (with associated series) posted at roughly the same time?

[FFmpeg-devel] ffmpeg_vdpau: Re-add ability to ignore level check

2016-06-07 Thread Mark Thompson
Fixes ticket 5286. Uses the global -hwaccel_lax_profile_check option (may be misnamed for this purpose, but it has the right spirit). --- Only compile tested (no hardware). Maybe -hwaccel_lax_profile_check should be renamed to something a bit more general - it was named for the specific VAAPI

[FFmpeg-devel] [PATCH 2/2] vaapi_encode_h26[45]: Reject bitrate targets higher than 2^31

2016-06-06 Thread Mark Thompson
--- I'll go with Matthieu's suggestion to use INT32_MAX instead of 1 << 31. libavcodec/vaapi_encode_h264.c | 6 ++ libavcodec/vaapi_encode_h265.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index dc7774b..2e2052b

[FFmpeg-devel] [PATCH 1/2] MAINTAINERS: Add myself as maintainer for VAAPI encoders

2016-06-06 Thread Mark Thompson
* Matthieu Bouron vaapi*Gwenole Beauchesne + vaapi_encode* Mark Thompson vda* Sebastien Zwickert vdpau*Philip Langdale, Carl Eugen Hoyos videotoolbox

Re: [FFmpeg-devel] [PATCH] vaapi_encode: explicitly free buffers after vaEndPicture

2016-06-09 Thread Mark Thompson
On 09/06/16 01:10, Will Kelleher wrote: > On 06/08, Mark Thompson wrote: >> On 08/06/16 21:02, Will Kelleher wrote: >>> On 06/08, Mark Thompson wrote: >>>> On 08/06/16 18:23, Will Kelleher wrote: >>>>> Hi all - >>>>> >>>>

Re: [FFmpeg-devel] [PATCH] vaapi_encode_h26[45]: Reject bitrate targets higher than 2^31

2016-06-03 Thread Mark Thompson
On 03/06/16 09:32, Matthieu Bouron wrote: > On Thu, Jun 02, 2016 at 10:36:21PM +0100, Mark Thompson wrote: >> On 02/06/16 22:00, Matthieu Bouron wrote: >>> On Thu, Jun 02, 2016 at 07:13:39PM +0100, Mark Thompson wrote: >>>> --- >>>> ... something like thi

Re: [FFmpeg-devel] ffmpeg_vdpau: Re-add ability to ignore level check

2016-06-08 Thread Mark Thompson
On 08/06/16 13:59, Carl Eugen Hoyos wrote: > Mark Thompson jkqxz.net> writes: > >> Uses the global -hwaccel_lax_profile_check option (may be >> misnamed for this purpose, but it has the right spirit). > > Iirc, all old x264 files have a very high profile set (

Re: [FFmpeg-devel] [PATCH] vaapi_encode: explicitly free buffers after vaEndPicture

2016-06-08 Thread Mark Thompson
On 08/06/16 21:02, Will Kelleher wrote: > On 06/08, Mark Thompson wrote: >> On 08/06/16 18:23, Will Kelleher wrote: >>> Hi all - >>> >>> I'm experiencing some significant heap growth when encoding with VAAPI on >>> my Ivy Bridge hardware. Based

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encoder_{h264, h265}: fix bad format warning

2016-06-02 Thread Mark Thompson
On 02/06/16 17:20, Matthieu Bouron wrote: > From: Matthieu Bouron > > --- > libavcodec/vaapi_encode_h264.c | 2 +- > libavcodec/vaapi_encode_h265.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/vaapi_encode_h264.c

[FFmpeg-devel] [PATCH] vaapi_encode_h26[45]: Reject bitrate targets higher than 2^31

2016-06-02 Thread Mark Thompson
--- ... something like this. libavcodec/vaapi_encode_h264.c | 6 ++ libavcodec/vaapi_encode_h265.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 0a99bb1..019ed1f 100644 --- a/libavcodec/vaapi_encode_h264.c

Re: [FFmpeg-devel] [PATCH] vaapi: Enable more libva surface formats

2016-06-01 Thread Mark Thompson
On 22/05/16 11:38, Mark Thompson wrote: > --- > These were not already enabled because the other tine does not have suitable > support for them. > > BGR0/RGB0 tested and working. I don't have any hardware for the others, but > I believe they should work. > > libavuti

[FFmpeg-devel] [PATCH v2 2/5] ffmpeg: hwaccel helper for VAAPI decode

2016-01-17 Thread Mark Thompson
From 845be894e8e0e2a966b6e51229cad1aadca36704 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 22:13:45 + Subject: [PATCH 2/5] ffmpeg: hwaccel helper for VAAPI decode --- Makefile | 1 + ffmpeg.h | 2 + ffmpeg_opt.c

[FFmpeg-devel] [PATCH v2 3/5] libavcodec: add VAAPI H.264 encoder

2016-01-17 Thread Mark Thompson
From 108355504c2eaa11101e1599ef7e01f18a2a8ac5 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 22:15:06 + Subject: [PATCH 3/5] libavcodec: add VAAPI H.264 encoder --- configure | 1 + libavcodec/Makefile | 1 + liba

[FFmpeg-devel] [PATCH v2 1/5] libavutil: some VAAPI infrastructure

2016-01-17 Thread Mark Thompson
From 45a803b627d0180c1aac928756924bd39ddf529d Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 22:13:20 + Subject: [PATCH 1/5] libavutil: some VAAPI infrastructure --- configure | 4 + libavutil/Makefile | 1 + libavutil/vaapi.c

Re: [FFmpeg-devel] [PATCH 1/5] libavutil: Some VAAPI infrastructure

2016-01-17 Thread Mark Thompson
On 17/01/16 17:53, wm4 wrote: On Sun, 17 Jan 2016 17:34:55 + Mark Thompson <s...@jkqxz.net> wrote: From 2442c1aca8778167c2e60a34d03ed452737f1366 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 15:48:54 + Subject: [PATCH 1/5] libavutil

[FFmpeg-devel] [PATCH v2 0/5] VAAPI support infrastructure, encoders

2016-01-17 Thread Mark Thompson
Hi, Here is a new version of this patchset. See previous email for the full summary. This fixes the main thread-safety complaint, that libva initialisation and operations weren't mutually excluded. It guards the

[FFmpeg-devel] [PATCH v2 4/5] libavcodec: add VAAPI H.265 encoder

2016-01-17 Thread Mark Thompson
From 7f4e62e0682786681fef1c6f52429fea6443a843 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 22:15:49 + Subject: [PATCH 4/5] libavcodec: add VAAPI H.265 encoder --- configure |1 + libavcodec/Makefile |1 + liba

[FFmpeg-devel] [PATCH v2 5/5] libavfilter: add VAAPI surface converter

2016-01-17 Thread Mark Thompson
From d1ddb63818c6ee04c7a25c5223fda9c50e19f4f4 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 22:16:13 + Subject: [PATCH 5/5] libavfilter: add VAAPI surface converter --- configure | 1 + libavfilter/Makefile

Re: [FFmpeg-devel] [PATCH 1/5] libavutil: Some VAAPI infrastructure

2016-01-17 Thread Mark Thompson
On 17/01/16 19:46, Mark Thompson wrote: On 17/01/16 18:46, wm4 wrote: There are two issues: 1. global state in libav* which is not synchronized 2. thread-safety within 1. is is completely unacceptable, because it can trigger undefined behavior if there is more than 1 libav* user in the same

Re: [FFmpeg-devel] [PATCH 1/5] libavutil: Some VAAPI infrastructure

2016-01-17 Thread Mark Thompson
On 17/01/16 18:46, wm4 wrote: There are two issues: 1. global state in libav* which is not synchronized 2. thread-safety within 1. is is completely unacceptable, because it can trigger undefined behavior if there is more than 1 libav* user in the same process. I'm not really convinced that a

Re: [FFmpeg-devel] [PATCH v2 1/5] libavutil: some VAAPI infrastructure

2016-01-17 Thread Mark Thompson
On 17/01/16 23:55, Michael Niedermayer wrote: > On Sun, Jan 17, 2016 at 10:45:37PM +0000, Mark Thompson wrote: >> From 45a803b627d0180c1aac928756924bd39ddf529d Mon Sep 17 00:00:00 2001 >> From: Mark Thompson <m...@jkqxz.net> >> Date: Sun, 17 Jan 2016 22:13:20 +

[FFmpeg-devel] [PATCH 0/5] VAAPI support infrastructure, encoders

2016-01-17 Thread Mark Thompson
Hi all, This patch series contains the following: * Some VAAPI infrastructure in libavutil. Initialisation code, along with routines to handle mapping and copying to/from VA surfaces. Doesn't really fit as a public API, but has to go there because it's used by the parts in both libavfilter

[FFmpeg-devel] [PATCH 1/5] libavutil: Some VAAPI infrastructure

2016-01-17 Thread Mark Thompson
From 2442c1aca8778167c2e60a34d03ed452737f1366 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 15:48:54 + Subject: [PATCH 1/5] libavutil: Some VAAPI infrastructure --- configure | 4 + libavutil/Makefile | 1 + libavutil/vaapi.c

[FFmpeg-devel] [PATCH 2/5] ffmpeg: hwaccel helper for VAAPI decode

2016-01-17 Thread Mark Thompson
From 390d4fdacbc2954489f6baa44190e7bf2f2621cc Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 15:55:32 + Subject: [PATCH 2/5] ffmpeg: hwaccel helper for VAAPI decode --- Makefile | 1 + ffmpeg.h | 2 + ffmpeg_opt.c

[FFmpeg-devel] [PATCH 4/5] libavcodec: add VAAPI H.265 encoder

2016-01-17 Thread Mark Thompson
From 5ea0c6f4e9a0086a1972bb142e9bd9b6b779a6c1 Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Sun, 17 Jan 2016 15:59:01 + Subject: [PATCH 4/5] libavcodec: add VAAPI H.265 encoder --- configure |1 + libavcodec/Makefile |1 + liba

Re: [FFmpeg-devel] [PATCH v3 1/5] libavutil: some VAAPI infrastructure

2016-01-18 Thread Mark Thompson
On 19/01/16 00:18, Michael Niedermayer wrote: > On Mon, Jan 18, 2016 at 10:49:51PM +0000, Mark Thompson wrote: >> >> --- >> configure | 4 + >> libavutil/Makefile | 1 + >> libavutil/vaapi.c | 497 >> +++

[FFmpeg-devel] [PATCH v3 0/5] VAAPI support infrastructure, encoders

2016-01-18 Thread Mark Thompson
Hi, Following* is another attempt, eliminating all global state (and making the user set it up instead). * Patch 1 loses all of the initialisation code while changing the hardware context structure to both be compatible with the one currently used by the decoder and to support locking. *

[FFmpeg-devel] [PATCH v3 5/5] libavfilter: VAAPI surface converter

2016-01-18 Thread Mark Thompson
vfilter/vf_vaapi_conv.c b/libavfilter/vf_vaapi_conv.c new file mode 100644 index 000..5180e7c --- /dev/null +++ b/libavfilter/vf_vaapi_conv.c @@ -0,0 +1,480 @@ +/* + * VAAPI converter (scaling and colour conversion). + * + * Copyright (C) 2016 Mark Thompson <m...@jkqxz.net> + *

[FFmpeg-devel] [PATCH v3 1/5] libavutil: some VAAPI infrastructure

2016-01-18 Thread Mark Thompson
o opencl_internal.o +OBJS-$(CONFIG_VAAPI)+= vaapi.o OBJS += $(COMPAT_OBJS:%=../compat/%) diff --git a/libavutil/vaapi.c b/libavutil/vaapi.c new file mode 100644 index 000..8a9a524 --- /dev/null +++ b/libavutil/vaapi.c @@ -0,0 +1,497 @@ +/* + * VAAPI helper functions. + * + * Copyrig

[FFmpeg-devel] [PATCH v3 3/5] libavcodec: VAAPI H.264 encoder

2016-01-18 Thread Mark Thompson
VC, hevc); REGISTER_DECODER(HEVC_QSV, hevc_qsv); diff --git a/libavcodec/vaapi_enc_h264.c b/libavcodec/vaapi_enc_h264.c new file mode 100644 index 000..7e09f80 --- /dev/null +++ b/libavcodec/vaapi_enc_h264.c @@ -0,0 +1,968 @@ +/* + * VAAPI H.264 encoder. + * + * Copyr

[FFmpeg-devel] [PATCH v3 2/5] ffmpeg: initialisation code for VAAPI, hwaccel helper

2016-01-18 Thread Mark Thompson
pt_vaapi }, "set VAAPI hardware context" }, +#endif + { NULL, }, }; diff --git a/ffmpeg_vaapi.c b/ffmpeg_vaapi.c new file mode 100644 index 000..e04532c --- /dev/null +++ b/ffmpeg_vaapi.c @@ -0,0 +1,622 @@ +/* + * VAAPI helper for hardware-accelerated decoding. + * + * Copyright (C)

[FFmpeg-devel] [PATCH v3 4/5] libavcodec: VAAPI H.265 encoder

2016-01-18 Thread Mark Thompson
diff --git a/libavcodec/vaapi_enc_hevc.c b/libavcodec/vaapi_enc_hevc.c new file mode 100644 index 000..885f1c8 --- /dev/null +++ b/libavcodec/vaapi_enc_hevc.c @@ -0,0 +1,1625 @@ +/* + * VAAPI H.265 encoder. + * + * Copyright (C) 2016 Mark Thompson <m...@jkqxz.net> + * + * This file is part

[FFmpeg-devel] [PATCH v6 1/6] libavcodec: VAAPI support infrastructure

2016-02-07 Thread Mark Thompson
VAImageFormat *image_format) +{ +VAStatus vas; +VAImageFormat *format_list; +int format_count, i, err; + +av_vaapi_lock_hardware_context(hw_ctx); + +format_count = vaMaxNumImageFormats(hw_ctx->display); +if(format_count <= 0) { +err = A

[FFmpeg-devel] [PATCH v6 2/6] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-02-07 Thread Mark Thompson
a_disable) }, "disable data" }, +#if CONFIG_VAAPI_RECENT +{ "vaapi", HAS_ARG | OPT_EXPERT, { .func_arg = opt_vaapi }, +"set VAAPI hardware context (DRM path or X11 display name)" }, +#endif + { NULL, }, }; diff --git a/ffmpeg_vaapi.c b/ffmpeg_vaapi

[FFmpeg-devel] [PATCH v6 0/6] VAAPI support infrastructure

2016-02-07 Thread Mark Thompson
Hi all, More VAAPI following. This is only parts one and two (infrastructure), the other parts have not changed beyond what is needed to support changes to these two. Changes: * Made some more structures user-opaque, added allocation functions for them. Log classes around them also more

Re: [FFmpeg-devel] [PATCH v6 1/6] libavcodec: VAAPI support infrastructure

2016-02-08 Thread Mark Thompson
On 08/02/16 12:08, wm4 wrote: On Sun, 7 Feb 2016 21:53:39 + Mark Thompson <s...@jkqxz.net> wrote: diff --git a/libavcodec/vaapi_support.h b/libavcodec/vaapi_support.h new file mode 100644 index 000..c159ee7 --- /dev/null +++ b/libavcodec/vaapi_support.h @@ -0,0 +1,284 @@ +/* + *

Re: [FFmpeg-devel] [PATCH v5 1/5] libavcodec: VAAPI support infrastructure

2016-02-02 Thread Mark Thompson
On 01/02/16 15:58, wm4 wrote: > On Sat, 30 Jan 2016 22:11:52 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> configure | 5 + >> libavcodec/Makefile| 1 + >> libavcodec/vaapi_support.c | 710 >> +++

Re: [FFmpeg-devel] [PATCH v5 5/5] libavfilter: VAAPI surface scaler

2016-02-02 Thread Mark Thompson
On 01/02/16 16:14, wm4 wrote: > On Sat, 30 Jan 2016 22:15:04 + > Mark Thompson <s...@jkqxz.net> wrote: >> +{ "hardware_context", "VAAPI hardware context", >> + OFFSET(hardware_context), AV_OPT_TYPE_INT64, >> + { .i64 =

Re: [FFmpeg-devel] [PATCH v5 2/5] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-02-02 Thread Mark Thompson
On 01/02/16 16:08, wm4 wrote: > On Sat, 30 Jan 2016 22:12:36 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> Makefile | 1 + >> configure | 5 + >> ffmpeg.c | 6 + >> ffmpeg.h | 9 + >>

Re: [FFmpeg-devel] [PATCH v5 1/5] libavcodec: VAAPI support infrastructure

2016-01-31 Thread Mark Thompson
On 31/01/16 16:13, wm4 wrote: > On Sat, 30 Jan 2016 22:11:52 + > Mark Thompson <s...@jkqxz.net> wrote: >> + >> +static AVClass vaapi_class = { >> +.class_name = "vaapi", >> +.item_name = av_default_item_name, >> +.version

Re: [FFmpeg-devel] [PATCH v5 1/5] libavcodec: VAAPI support infrastructure

2016-01-31 Thread Mark Thompson
On 31/01/16 16:24, Mark Thompson wrote: > On 31/01/16 16:13, wm4 wrote: >> On Sat, 30 Jan 2016 22:11:52 +0000 >> Mark Thompson <s...@jkqxz.net> wrote: >>> + >>> +static AVClass vaapi_class = { >>> +.class_name = "vaapi", >

[FFmpeg-devel] [PATCH v5 2/5] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-01-30 Thread Mark Thompson
a_disable) }, "disable data" }, +#if CONFIG_VAAPI_RECENT +{ "vaapi", HAS_ARG | OPT_EXPERT, { .func_arg = opt_vaapi }, +"set VAAPI hardware context (DRM path or X11 display name)" }, +#endif + { NULL, }, }; diff --git a/ffmpeg_vaapi.c b/ffmpeg_vaapi

[FFmpeg-devel] [PATCH v5 1/5] libavcodec: VAAPI support infrastructure

2016-01-30 Thread Mark Thompson
w_ctx); + +format_count = vaMaxNumImageFormats(hw_ctx->display); +if(format_count <= 0) { +err = AVERROR_EXTERNAL; +goto fail; +} + +format_list = av_calloc(format_count, sizeof(VAImageFormat)); +if(!format_list) { +err = AVERROR(ENOMEM); +goto f

[FFmpeg-devel] [PATCH v5 0/5] VAAPI support infrastructure, encoders

2016-01-30 Thread Mark Thompson
Hi all, Here is another iteration of the VAAPI encode patch series. Changes: * Support code moved to libavcodec. Since there is already vaapi.[ch] there (decoding stuff), this has become vaapi_support.[ch]. * Added -hwaccel_output_format option, allowing explicit selection of the format

Re: [FFmpeg-devel] [PATCH v5 5/5] libavfilter: VAAPI surface scaler

2016-01-30 Thread Mark Thompson
On 30/01/16 22:22, Paul B Mahol wrote: > On 1/30/16, Mark Thompson <s...@jkqxz.net> wrote: >> >> --- >> configure| 3 + >> libavfilter/Makefile | 1 + >> libavfilter/allfilters.c | 1 +

[FFmpeg-devel] [PATCH v5 4/5] libavcodec: VAAPI H.265 encoder

2016-01-30 Thread Mark Thompson
ODER(HEVC_QSV, hevc_qsv); +REGISTER_ENCODER(HEVC_VAAPI,hevc_vaapi); REGISTER_DECODER(HNM4_VIDEO,hnm4_video); REGISTER_DECODER(HQ_HQA,hq_hqa); REGISTER_DECODER(HQX, hqx); diff --git a/libavcodec/vaapi_enc_hevc.c b/libavcodec/vaapi_enc_hevc.c new fi

[FFmpeg-devel] [PATCH v5 3/5] libavcodec: VAAPI H.264 encoder

2016-01-30 Thread Mark Thompson
ER(H264_VDPAU,h264_vdpau); #endif +REGISTER_ENCODER(H264_VAAPI,h264_vaapi); REGISTER_ENCDEC (HAP, hap); REGISTER_DECODER(HEVC, hevc); REGISTER_DECODER(HEVC_QSV, hevc_qsv); diff --git a/libavcodec/vaapi_enc_h264.c b/libavcodec/vaapi_enc_h264.c n

[FFmpeg-devel] [PATCH v5 5/5] libavfilter: VAAPI surface scaler

2016-01-30 Thread Mark Thompson
_scale,vf); REGISTER_FILTER(VECTORSCOPE,vectorscope,vf); REGISTER_FILTER(VFLIP, vflip, vf); REGISTER_FILTER(VIDSTABDETECT, vidstabdetect, vf); diff --git a/libavfilter/vf_vaapi_scale.c b/libavfilter/vf_vaapi_scale.c new file mode 100644 index 000

Re: [FFmpeg-devel] [PATCH v5 5/5] libavfilter: VAAPI surface scaler

2016-01-31 Thread Mark Thompson
On 31/01/16 09:32, Paul B Mahol wrote: > On 1/30/16, Mark Thompson <s...@jkqxz.net> wrote: >> On 30/01/16 22:22, Paul B Mahol wrote: >>> On 1/30/16, Mark Thompson <s...@jkqxz.net> wrote: >>>> >>>> --- >>>> configure

Re: [FFmpeg-devel] [PATCH v5 1/5] libavcodec: VAAPI support infrastructure

2016-01-31 Thread Mark Thompson
On 31/01/16 01:02, Timothy Gu wrote: > On Sat, Jan 30, 2016 at 10:11:52PM +0000, Mark Thompson wrote: >> +static AVClass vaapi_class = { > > static const > >> +.class_name = "vaapi", >> +.item_name = av_default_item_name, >> +.version

[FFmpeg-devel] [PATCH v4 4/5] libavcodec: VAAPI H.265 encoder

2016-01-23 Thread Mark Thompson
ODER(HEVC_QSV, hevc_qsv); +REGISTER_ENCODER(HEVC_VAAPI,hevc_vaapi); REGISTER_DECODER(HNM4_VIDEO,hnm4_video); REGISTER_DECODER(HQ_HQA,hq_hqa); REGISTER_DECODER(HQX, hqx); diff --git a/libavcodec/vaapi_enc_hevc.c b/libavcodec/vaapi_enc_hevc.c new fi

[FFmpeg-devel] [PATCH v4 5/5] libavfilter: VAAPI surface converter

2016-01-23 Thread Mark Thompson
_conv, vf); REGISTER_FILTER(VECTORSCOPE,vectorscope,vf); REGISTER_FILTER(VFLIP, vflip, vf); REGISTER_FILTER(VIDSTABDETECT, vidstabdetect, vf); diff --git a/libavfilter/vf_vaapi_conv.c b/libavfilter/vf_vaapi_conv.c new file mode 100644 index 000..c8034e7 --- /d

[FFmpeg-devel] [PATCH v4 0/5] VAAPI support infrastructure, encoders

2016-01-23 Thread Mark Thompson
Hi all, Following is a new version of the patch series for VAAPI encode and support infrastructure around that. Notable updates: * Everything is now passed around and reference counted with AVFrames/AVBuffers. * Most of FATE for H.264 and H.265 now passes with VAAPI decoders (see notes on

[FFmpeg-devel] [PATCH v4 2/5] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-01-23 Thread Mark Thompson
ontext" }, +#endif + { NULL, }, }; diff --git a/ffmpeg_vaapi.c b/ffmpeg_vaapi.c new file mode 100644 index 000..9a71cc2 --- /dev/null +++ b/ffmpeg_vaapi.c @@ -0,0 +1,633 @@ +/* + * VAAPI helper for hardware-accelerated decoding. + * + * Copyright (C) 2016 Mark Thompson <m...@jkqxz.n

[FFmpeg-devel] [PATCH v4 3/5] libavcodec: VAAPI H.264 encoder

2016-01-23 Thread Mark Thompson
ER(H264_VDPAU,h264_vdpau); #endif +REGISTER_ENCODER(H264_VAAPI,h264_vaapi); REGISTER_ENCDEC (HAP, hap); REGISTER_DECODER(HEVC, hevc); REGISTER_DECODER(HEVC_QSV, hevc_qsv); diff --git a/libavcodec/vaapi_enc_h264.c b/libavcodec/vaapi_enc_h264.c n

[FFmpeg-devel] [PATCH v4 1/5] libavutil: VAAPI infrastructure

2016-01-23 Thread Mark Thompson
/dev/null +++ b/libavutil/vaapi.c @@ -0,0 +1,546 @@ +/* + * VAAPI helper functions. + * + * Copyright (C) 2016 Mark Thompson <m...@jkqxz.net> + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser

Re: [FFmpeg-devel] [PATCH v4 2/5] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-01-24 Thread Mark Thompson
On 24/01/16 00:43, Timothy Gu wrote: > On Sat, Jan 23, 2016 at 07:14:29PM +0000, Mark Thompson wrote: >> >> +#if CONFIG_VAAPI_RECENT >> +{ "vaapi", HAS_ARG, { .func_arg = opt_vaapi }, "set VAAPI hardware >> context" }, > > What is "h

Re: [FFmpeg-devel] [PATCH v4 1/5] libavutil: VAAPI infrastructure

2016-01-24 Thread Mark Thompson
On 24/01/16 00:34, Timothy Gu wrote: > On Sat, Jan 23, 2016 at 07:13:38PM +0000, Mark Thompson wrote: >> +av_log(0, AV_LOG_ERROR, "Failed to destroy surface: " >> + "%d (%s).\n", vas, vaErrorStr(vas)); > > Maybe you can consider addin

Re: [FFmpeg-devel] [PATCH v4 2/5] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-01-24 Thread Mark Thompson
On 24/01/16 12:42, wm4 wrote: > On Sat, 23 Jan 2016 19:14:29 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> Makefile | 1 + >> configure | 5 + >> ffmpeg.c | 6 + >> ffmpeg.h | 5 + >>

Re: [FFmpeg-devel] [PATCH v4 5/5] libavfilter: VAAPI surface converter

2016-01-24 Thread Mark Thompson
On 24/01/16 00:21, Timothy Gu wrote: > On Sat, Jan 23, 2016 at 07:17:00PM +0000, Mark Thompson wrote: >> +err = ...(...); >> +if(err) { > > err < 0? > Is there a policy on this? For functions with only zero success or error code, I would prefer to

Re: [FFmpeg-devel] [PATCH v4 1/5] libavutil: VAAPI infrastructure

2016-01-24 Thread Mark Thompson
On 24/01/16 12:29, wm4 wrote: > On Sat, 23 Jan 2016 19:13:38 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> configure | 5 + >> libavutil/Makefile | 1 + >> libavutil/vaapi.c | 546 >> +

Re: [FFmpeg-devel] [PATCH v4 2/5] ffmpeg: VAAPI hwaccel helper and related initialisation

2016-01-24 Thread Mark Thompson
On 24/01/16 14:52, wm4 wrote: > On Sun, 24 Jan 2016 14:20:54 + > Mark Thompson <s...@jkqxz.net> wrote: > > ... > >>>> + >>>> +new_frame = av_frame_alloc(); >>>> +if(!new_frame) >>>> +return AVERROR

Re: [FFmpeg-devel] [PATCH v3 2/5] ffmpeg: initialisation code for VAAPI, hwaccel helper

2016-01-19 Thread Mark Thompson
On 19/01/16 12:16, wm4 wrote: > On Mon, 18 Jan 2016 22:50:50 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> Makefile | 1 + >> ffmpeg.c | 5 + >> ffmpeg.h | 5 + >> ffm

Re: [FFmpeg-devel] [PATCH v3 5/5] libavfilter: VAAPI surface converter

2016-01-19 Thread Mark Thompson
On 19/01/16 12:27, wm4 wrote: > On Mon, 18 Jan 2016 22:53:33 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> configure | 1 + >> libavfilter/Makefile| 1 + >> libavfilter/allfilters.c| 1

Re: [FFmpeg-devel] [PATCH v3 1/5] libavutil: some VAAPI infrastructure

2016-01-19 Thread Mark Thompson
On 19/01/16 11:54, wm4 wrote: > On Mon, 18 Jan 2016 22:49:51 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> configure | 4 + >> libavutil/Makefile | 1 + >> libavutil/vaapi.c | 497 >> +

Re: [FFmpeg-devel] [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a NAL unit in bytestream format.

2016-03-19 Thread Mark Thompson
On 17/03/16 07:51, Hendrik Leppkes wrote: > On Thu, Mar 17, 2016 at 12:50 AM, Mark Thompson <s...@jkqxz.net> wrote: >> On 16/03/16 23:41, Hendrik Leppkes wrote: >>> On Wed, Mar 16, 2016 at 9:37 PM, Mark Thompson <s...@jkqxz.net> wrote: >>>

Re: [FFmpeg-devel] [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a NAL unit in bytestream format.

2016-03-19 Thread Mark Thompson
On 17/03/16 12:30, Hendrik Leppkes wrote: > On Thu, Mar 17, 2016 at 1:21 PM, Hendrik Leppkes <h.lepp...@gmail.com> wrote: >> On Thu, Mar 17, 2016 at 1:10 PM, Mark Thompson <s...@jkqxz.net> wrote: >>>> >>>> Wouldn't it be simpler then to add a conditio

Re: [FFmpeg-devel] [PATCH] avcodec/qsv: export session management functionality

2016-04-13 Thread Mark Thompson
On 13/04/16 09:14, nablet developer wrote: > >> On 13 Apr 2016, at 14:08, wm4 wrote: >> >> On Thu, 7 Apr 2016 11:44:20 -0400 >> nablet developer > wrote: >> >>> Signed-off-by: nablet developer >>> --- >>>

Re: [FFmpeg-devel] [PATCH] added support for hardware assist H264 video encoding for the Raspberry Pi

2016-04-05 Thread Mark Thompson
On 01/04/16 03:27, Amancio Hasty wrote: > LICENSE.md | 36 + > MAINTAINERS| 1 + > configure | 11 ++ > libavcodec/Makefile| 1 + > libavcodec/allcodecs.c | 2 + > libavcodec/vc264.c | 389 >

Re: [FFmpeg-devel] [PATCH] added support for hardware assist H264 video encoding for the Raspberry Pi

2016-04-07 Thread Mark Thompson
On 06/04/16 14:25, Amancio Hasty wrote: > >> On Apr 6, 2016, at 3:42 AM, wm4 wrote: >> >> On Wed, 6 Apr 2016 02:56:49 -0700 >> Amancio Hasty wrote: >> >>> If you think is better and it works , are there any plans to incorporate >>> such an older patch?

Re: [FFmpeg-devel] [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a NAL unit in bytestream format.

2016-03-19 Thread Mark Thompson
On 16/03/16 23:41, Hendrik Leppkes wrote: > On Wed, Mar 16, 2016 at 9:37 PM, Mark Thompson <s...@jkqxz.net> wrote: >> --- >> libavcodec/hevc_parse.c | 14 ++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/libavcodec/hevc_parse.c b/l

[FFmpeg-devel] [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a NAL unit in bytestream format.

2016-03-19 Thread Mark Thompson
Hi, See attached; fixes ticket #5344. Thanks, - Mark >From fbc76e59225d2a6a0609119ca682d4886874705b Mon Sep 17 00:00:00 2001 From: Mark Thompson <m...@jkqxz.net> Date: Wed, 16 Mar 2016 20:26:39 + Subject: [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a

Re: [FFmpeg-devel] [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a NAL unit in bytestream format.

2016-03-19 Thread Mark Thompson
On 17/03/16 14:11, Mark Thompson wrote: > On 17/03/16 13:57, Michael Niedermayer wrote: >> On Thu, Mar 17, 2016 at 01:48:37PM +0000, Mark Thompson wrote: >>> hevc_parse.c | 10 -- >>> 1 file changed, 8 insertions(+), 2 deletions(-) >>> daf73b16f818522

Re: [FFmpeg-devel] [PATCH] lavc/hevc: Allow arbitrarily many trailing_zero_8bits after a NAL unit in bytestream format.

2016-03-20 Thread Mark Thompson
On 17/03/16 13:57, Michael Niedermayer wrote: > On Thu, Mar 17, 2016 at 01:48:37PM +0000, Mark Thompson wrote: >> hevc_parse.c | 10 -- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> daf73b16f8185221a1e8112ab1928157a855fe76 >> 0001-lavc-h

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mpegts: Skip over broken 0x80 headers

2016-04-24 Thread Mark Thompson
On 24/04/16 03:53, Michael Niedermayer wrote: > 0x47 is expected to be at [0] but the affected files contain something > else sometimes in its place that starts with 0x80 and is 12 bytes long > it contains some counter or timestamp > without the code above it will almost always work but if the

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mpegts: Skip over broken 0x80 headers

2016-04-27 Thread Mark Thompson
On 24/04/16 23:24, Michael Niedermayer wrote: > On Sun, Apr 24, 2016 at 11:27:32AM +0100, Mark Thompson wrote: >> On 24/04/16 03:53, Michael Niedermayer wrote: >>> 0x47 is expected to be at [0] but the affected files contain something >>> else sometimes in its place that

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

2016-05-22 Thread Mark Thompson
On 20/05/16 11:31, Andrey Turkin wrote: > avcodec_copy_context didn't handle hw_frames_ctx references correctly which > could cause crashes. > --- > > Changes from v1: reverted changes to avcodec_free_context > > > libavcodec/options.c | 9 + > 1 file changed, 9 insertions(+) > >

[FFmpeg-devel] [PATCH] vaapi: Enable more libva surface formats

2016-05-22 Thread Mark Thompson
--- These were not already enabled because the other tine does not have suitable support for them. BGR0/RGB0 tested and working. I don't have any hardware for the others, but I believe they should work. libavutil/hwcontext_vaapi.c | 10 +- 1 file changed, 5 insertions(+), 5

Re: [FFmpeg-devel] [PATCH] avutil/qsv: move ff_qsv_error function from libavcodec into libavutil, because it's going to be shared between libavcodec (existing QSV encoders & decoders), libavfilter (up

2016-05-24 Thread Mark Thompson
On 13/04/16 09:18, nablet developer wrote: > Signed-off-by: nablet developer > --- > libavcodec/qsv.c | 35 +--- > libavcodec/qsv_internal.h | 5 > libavcodec/qsvdec.c | 1 + > libavcodec/qsvenc.c | 1 + > libavutil/Makefile

Re: [FFmpeg-devel] [PATCH] avutil/qsv: move ff_qsv_error function from libavcodec into libavutil, because it's going to be shared between libavcodec (existing QSV encoders & decoders), libavfilter (up

2016-05-24 Thread Mark Thompson
On 24/05/16 12:49, nablet developer wrote: > >> On 24 May 2016, at 17:01, Mark Thompson <s...@jkqxz.net> wrote: >> >> On 13/04/16 09:18, nablet developer wrote: >>> Signed-off-by: nablet developer <s...@nablet.com>

Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-23 Thread Mark Thompson
On 23/07/16 21:19, Ivan Uskov wrote: > Second (subjective) problem that nobody in ffmpeg community is interested to > advance QSV codecs. Most of patches at this year provided by me or by my > colleagues (including tries to solve issue with GPU memory) were rejected or > ignored silently.

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-23 Thread Mark Thompson
On 23/07/16 20:33, Ivan Uskov wrote: > If you are use qsv, I would like to recommend to roll-back to version before > d30cf57a7b2097b565db02ecfffbdc9c16423d0e > Really the d30cf57a7b2097b565db02ecfffbdc9c16423d0e is useless and only > makes code complex and work slow, the sync variable is not

Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing]

2016-07-30 Thread Mark Thompson
On 30/07/16 15:50, Jens Ziller wrote: > Am Samstag, den 16.07.2016, 17:27 +0200 schrieb Jens Ziller: >> Hello Rodger and wm4, >> >> for interlaced frames I need AVFrame->interlaced_frame. For invoke >> MMAL >> components like deinterlacer and renderer added a pointer data[2] to >> existing

Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing]

2016-07-31 Thread Mark Thompson
On 31/07/16 15:51, Jens Ziller wrote: > Am Samstag, den 30.07.2016, 17:30 +0100 schrieb Mark Thompson: >> Does this also do the right thing if the decoder is reconfigured with >> frames outstanding? To me (without really knowing the code) it looks >> like it will overwrite

Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing]

2016-07-31 Thread Mark Thompson
On 31/07/16 18:09, Jens Ziller wrote: > Am Sonntag, den 31.07.2016, 16:33 +0100 schrieb Mark Thompson: >> Try the test stream h264/reinit-large_420_8-to-small_420_8.h264 in >> FATE? > I don't test it. I tested with MPEG2 and H264 DVB-S streams. Where can > I find this test

Re: [FFmpeg-devel] FFmpeg 3.1.2

2016-08-04 Thread Mark Thompson
On 04/08/16 11:25, Michael Niedermayer wrote: > ill soon make FFmpeg 3.1.2 > that is if someone wants something backported, do it now! We should fix in ffmpeg - Debian carrying the patch is not helpful. Nicolas, would you (or someone

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-15 Thread Mark Thompson
On 15/07/16 07:15, Chao Liu wrote: > Ivan Uskov nablet.com> writes: > >> >> Hello All, >> >> After commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e qsv-based > decoding >> aborts with crash, there are many incorrect places appeared. The > attached >> patch fixes the issues but keeps

Re: [FFmpeg-devel] ffmpeg_vdpau: Re-add ability to ignore level check

2016-06-27 Thread Mark Thompson
On 26/06/16 23:49, Michael Niedermayer wrote: > On Tue, Jun 07, 2016 at 07:51:18PM +0100, Mark Thompson wrote: >> Fixes ticket 5286. >> >> Uses the global -hwaccel_lax_profile_check option (may be misnamed >> for this purpose, but it has the right spirit). &g

Re: [FFmpeg-devel] [PATCH] PPC64: Add versions of functions in libswscale/input.c optimized for POWER8 VSX SIMD.

2016-07-06 Thread Mark Thompson
On 06/07/16 13:28, Dan Parrot wrote: > On Wed, 2016-07-06 at 09:07 +0200, Hendrik Leppkes wrote: >> On Wed, Jul 6, 2016 at 4:37 AM, Dan Parrot wrote: >>> Finish providing SIMD versions for POWER8 VSX of functions in >>> libswscale/input.c That should allow trac ticket #5570

Re: [FFmpeg-devel] FFmpeg 3.1.2

2016-08-05 Thread Mark Thompson
On 04/08/16 13:22, Mark Thompson wrote: > On 04/08/16 11:25, Michael Niedermayer wrote: >> ill soon make FFmpeg 3.1.2 >> that is if someone wants something backported, do it now! > > We should fix <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831529> in > ffmp

Re: [FFmpeg-devel] [Libav-user] [PATCH]Fix a crash in vaapi_encode if "." is not the decimal separator

2016-08-02 Thread Mark Thompson
On 02/08/16 18:39, Nicolas George wrote: > Le sextidi 16 thermidor, an CCXXIV, Carl Eugen Hoyos a écrit : >> -{ "i_qfactor", "1.0" }, >> -{ "i_qoffset", "0.0" }, >> -{ "b_qfactor", "1.2" }, >> -{ "b_qoffset", "0.0" }, >> +{ "i_qfactor", "1" }, >> +

Re: [FFmpeg-devel] [PATCH 1/5] lavc : yami : add libyami decoder/encoder

2016-08-16 Thread Mark Thompson
On 16/08/16 09:51, Jun Zhao wrote: > > barry@barry:~/Source/video/yami/ffmpeg_libyami$ ./ffmpeg -y -vaapi_device > /dev/dri/card0 -hwaccel vaapi -hwaccel_output_format vaapi -i > ../ffmpeg_yami_testcase/skyfall2-trailer.mp4 -an -vf > 'format=nv12|vaapi,hwupload' -c:v h264_vaapi -profile 77

Re: [FFmpeg-devel] [PATCH 1/5] lavc : yami : add libyami decoder/encoder

2016-08-16 Thread Mark Thompson
On 16/08/16 03:44, Jun Zhao wrote: > > > On 2016/8/16 10:14, Chao Liu wrote: >> On Mon, Aug 15, 2016 at 6:00 PM, Jun Zhao wrote: >> >>> >>> >>> On 2016/8/16 1:48, Jean-Baptiste Kempf wrote: On 15 Aug, Hendrik Leppkes wrote : >> On Mon, Aug 15, 2016 at 10:22 AM, Jun

Re: [FFmpeg-devel] [PATCH v3] avfilter/scale: refactor common code for scaling height/width expressions

2017-02-01 Thread Mark Thompson
On 02/02/17 00:30, Aman Gupta wrote: > From: Aman Gupta > > Implements support for height/width expressions in vf_scale_vaapi, > by refactoring common code into a new libavfilter/scale.c > --- > libavfilter/Makefile | 8 +-- > libavfilter/scale.c | 152 >

[FFmpeg-devel] [PATCH] lavc: Add device context field to AVCodecContext

2017-02-01 Thread Mark Thompson
For use by codec implementations which can allocate frames internally. --- On 01/02/17 14:03, Timo Rothenpieler wrote: > Am 17.01.2017 um 23:28 schrieb Mark Thompson: >> For use by codec implementations which require a device to operation >> but will allocate fr

Re: [FFmpeg-devel] [PATCH v2] avfilter/scale: refactor common code for scaling height/width expressions

2017-02-01 Thread Mark Thompson
On 01/02/17 23:12, Aman Gupta wrote: > From: Aman Gupta > > Implements support for height/width expressions in vf_scale_vaapi, > by refactoring common code into a new libavfilter/scale.c Some more minor points: > --- > libavfilter/Makefile | 8 +-- >

Re: [FFmpeg-devel] [PATCH] avfilter/scale: refactor common code for scaling height/width expressions

2017-02-01 Thread Mark Thompson
On 01/02/17 00:46, Aman Gupta wrote: > From: Aman Gupta > > Implements support for height/width expressions in vf_scale_vaapi, > by refactoring common code into a new libavfilter/scale.c Nice! Patch as a whole LGTM, some minor nits below. > --- > libavfilter/Makefile |

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vaapi: fix SEGV in vaTerminate when vaInitialize fails

2017-02-03 Thread Mark Thompson
On 03/02/17 05:45, wm4 wrote: > On Thu, 2 Feb 2017 09:29:13 -0800 > Aman Gupta wrote: > >> From: Aman Gupta >> >> Program terminated with signal SIGSEGV, Segmentation fault. >> opts=opts@entry=0x0, flags=flags@entry=0) at libavutil/hwcontext.c:494 >> --- >>

  1   2   3   4   5   6   7   8   9   10   >