Re: [libav-devel] [PATCH v4] qsvvpp: Fix to perform full init only when needed

2018-07-17 Thread Mark Thompson
On 18/07/18 00:25, Maxym Dmytrychenko wrote: > On Wed, Jul 18, 2018 at 12:48 AM Mark Thompson wrote: > >> On 17/07/18 17:07, Maxym Dmytrychenko wrote: >>> Not used VPP sessions, like for hwupload/hwdownload handling, >>> can increase CPU utilization and this pat

Re: [libav-devel] [PATCH v4] qsvvpp: Fix to perform full init only when needed

2018-07-17 Thread Mark Thompson
On 17/07/18 17:07, Maxym Dmytrychenko wrote: > Not used VPP sessions, like for hwupload/hwdownload handling, > can increase CPU utilization and this patch fixes it. > thank you,Joe, for the contribution. > > Signed-off-by: Maxym Dmytrychenko > --- > libavutil/hwcontext_qsv.c | 38

Re: [libav-devel] [PATCH v3] qsvvpp: Fix to perform full init only when needed

2018-07-16 Thread Mark Thompson
On 16/07/18 23:13, Maxym Dmytrychenko wrote: > On Tue, Jul 17, 2018 at 12:00 AM Mark Thompson wrote: > >> On 16/07/18 14:26, Maxym Dmytrychenko wrote: >>> Not used VPP sessions, like for hwupload/hwdownload handling, >>> can increase CPU utilization and this pat

Re: [libav-devel] [PATCH v3] qsvvpp: Fix to perform full init only when needed

2018-07-16 Thread Mark Thompson
On 16/07/18 14:26, Maxym Dmytrychenko wrote: > Not used VPP sessions, like for hwupload/hwdownload handling, > can increase CPU utilization and this patch fixes it. > thank you,Joe, for the contribution. > > Signed-off-by: Maxym Dmytrychenko > --- > libavutil/hwcontext_qsv.c | 35

Re: [libav-devel] [PATCH V2 2/3] lavu/hwcontext_qsv: Add support for pix_fmt RGB32.

2018-04-02 Thread Mark Thompson
On 02/04/18 10:32, Li, Zhong wrote: >>> diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c >>> index 5018a05..0db446b 100644 >>> --- a/libavutil/hwcontext_qsv.c >>> +++ b/libavutil/hwcontext_qsv.c >>> ... >>> +surface->Data.Y = frame->data[0]; >>> +

Re: [libav-devel] [PATCH V2 2/3] lavu/hwcontext_qsv: Add support for pix_fmt RGB32.

2018-03-29 Thread Mark Thompson
On 22/03/18 14:41, Zhong Li wrote: > RGB32 format may be used as overlay with alpha blending. > So add RGB32 format support. > > Signed-off-by: ChaoX A Liu > Signed-off-by: Zhong Li > --- > libavutil/hwcontext_qsv.c | 43

Re: [libav-devel] [PATCH] qsv: adding Multi Frame Encode support

2018-03-28 Thread Mark Thompson
On 27/03/18 23:07, Maxym Dmytrychenko wrote: > On Tue, Mar 27, 2018 at 12:47 AM, Mark Thompson <s...@jkqxz.net> wrote: > >> On 26/03/18 21:18, Maxym Dmytrychenko wrote: >>> Starting from API 1.25 helps to improve performance of the simultaneous >> encode, >>

Re: [libav-devel] [PATCH] qsv: adding Multi Frame Encode support

2018-03-26 Thread Mark Thompson
On 26/03/18 21:18, Maxym Dmytrychenko wrote: > Starting from API 1.25 helps to improve performance of the simultaneous > encode, > 1:N scenario, like: > > ./avconv -y -hwaccel qsv -c:v h264_qsv -r 3/1001 -i > ~/bbb_sunflower_1080p_60fps_normal.mp4 -vframes 600 -an \ > -filter_complex

[libav-devel] [PATCH 4/5] vf_crop: Add support for cropping VAAPI hardware frames

2018-03-06 Thread Mark Thompson
--- libavfilter/vf_crop.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 4122d52f8..abc27c8de 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -107,6

[libav-devel] [PATCH 5/5] vf_scale_vaapi: Apply cropping rectangle to input

2018-03-06 Thread Mark Thompson
--- libavfilter/vf_scale_vaapi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index e92df44ba..6bd54d822 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -74,13 +74,13 @@

[libav-devel] [PATCH 3/5] lavfi: use common VAAPI VPP infrastructure for vf_deinterlace_vaapi

2018-03-06 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> From ffmpeg commit 92704c480e811e0bd2a605173559d2baa974119f. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavfilter/Makefile | 2 +- libavfilter/vf_deinterlace_vaapi.c | 341 + 2 files

[libav-devel] [PATCH 1/5] lavfi: VAAPI VPP common infrastructure.

2018-03-06 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> Re-work the VAAPI common infrastructure to avoid code duplication between filters. From ffmpeg commit dfdeed5a2c8f432d6c5eda1a3a6a1f333f3d4604. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavfilter/Makefile| 1 + libavfilter/vaapi

[libav-devel] [PATCH 2/5] lavfi: use common VAAPI VPP infrastructure for vf_scale_vaapi

2018-03-06 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> From ffmpeg commit 19214f005140b0ee7f706509bd3fab47f4af9b90. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavfilter/Makefile | 2 +- libavfilter/vf_scale_vaapi.c | 333 +-- 2 files

Re: [libav-devel] [libav-commits] qsvenc: Provide a detailed error message if the parameters are invalid

2018-03-05 Thread Mark Thompson
On 05/03/18 09:40, Zhong Li wrote: > Module: libav > Branch: master > Commit: 2d6b3f3a9dce409ca51d70ef4b85c0593bb4b109 > > Author:Zhong Li > Committer: Luca Barbato > Date: Fri Mar 2 11:26:27 2018 +0800 > > qsvenc: Provide a detailed error

Re: [libav-devel] [PATCH 1/7] avcodec: Always fill the encoder target framerate

2018-02-21 Thread Mark Thompson
On 16/02/18 17:02, Luca Barbato wrote: > In preparation of using it in the encoders. > --- > libavcodec/avcodec.h | 3 ++- > libavcodec/utils.c | 5 + > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index

Re: [libav-devel] [PATCH 5/6] vf_crop: Reindent after previous commit

2018-02-15 Thread Mark Thompson
On 15/02/18 09:29, Diego Biurrun wrote: > On Wed, Feb 14, 2018 at 10:54:30PM +0000, Mark Thompson wrote: >> --- >> libavfilter/vf_crop.c | 30 +++--- >> 1 file changed, 15 insertions(+), 15 deletions(-) > > Just squash it with 4/6 IMO. Ok,

Re: [libav-devel] [PATCH 1/6] lavfi: VAAPI VPP common infrastructure.

2018-02-15 Thread Mark Thompson
On 15/02/18 09:27, Diego Biurrun wrote: > On Wed, Feb 14, 2018 at 10:54:26PM +0000, Mark Thompson wrote: >> --- /dev/null >> +++ b/libavfilter/vaapi_vpp.c >> @@ -0,0 +1,370 @@ >> + >> +#include >> + >> +#include "config.h" > > Thi

[libav-devel] [PATCH 1/6] lavfi: VAAPI VPP common infrastructure.

2018-02-14 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> Re-work the VAAPI common infrastructure to avoid code duplication between filters. From ffmpeg commit dfdeed5a2c8f432d6c5eda1a3a6a1f333f3d4604. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavfilter/vaapi

[libav-devel] [PATCH 4/6] vf_crop: Add support for cropping VAAPI hardware frames

2018-02-14 Thread Mark Thompson
--- Just VAAPI here because with the following patch it has support to actually use it in libavfilter. If wanted it could be enabled for all hardware formats, or maybe a specific whitelist? libavfilter/vf_crop.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-)

[libav-devel] [PATCH 6/6] vf_scale_vaapi: Apply cropping rectangle to input

2018-02-14 Thread Mark Thompson
--- libavfilter/vf_scale_vaapi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index e92df44ba..6bd54d822 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -74,13 +74,13 @@

[libav-devel] [PATCH 3/6] lavfi: use common VAAPI VPP infrastructure for vf_deinterlace_vaapi

2018-02-14 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> From ffmpeg commit 92704c480e811e0bd2a605173559d2baa974119f. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavfilter/Makefile | 2 +- libavfilter/vf_deinterlace_vaapi.c | 339 + 2 files

[libav-devel] [PATCH 2/6] lavfi: use common VAAPI VPP infrastructure for vf_scale_vaapi

2018-02-14 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> From ffmpeg commit 19214f005140b0ee7f706509bd3fab47f4af9b90. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavfilter/Makefile | 2 +- libavfilter/vf_scale_vaapi.c | 333 +-- 2 files

[libav-devel] [PATCH 5/6] vf_crop: Reindent after previous commit

2018-02-14 Thread Mark Thompson
--- libavfilter/vf_crop.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index dc7fa0dde..abc27c8de 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -168,8 +168,8 @@ static int

Re: [libav-devel] [PATCH 04/16] vaapi_encode: Allocate slice structures and parameter buffers dynamically

2018-02-14 Thread Mark Thompson
On 11/02/18 18:14, Mark Thompson wrote: > From: Jun Zhao <mypopy...@gmail.com> > > This removes the arbitrary limit on the allowed number of slices and > parameter buffers. > > From ffmpeg commit e4a6eb70f471eda36592078e8fa1bad87fc9df73. > > Signed-off-by:

Re: [libav-devel] [PATCH 10/16] cbs: Refcount all the things!

2018-02-11 Thread Mark Thompson
On 12/02/18 00:31, James Almer wrote: > On 2/11/2018 3:14 PM, Mark Thompson wrote: >> +int ff_cbs_alloc_unit_content(CodedBitstreamContext *ctx, >> + CodedBitstreamUnit *unit, >> + size_t size, >> +

Re: [libav-devel] [PATCH 6/8] vf_hwupload/hwmap: Support setting a fixed pool size

2018-02-11 Thread Mark Thompson
On 11/02/18 23:30, wm4 wrote: > On Sun, 11 Feb 2018 23:09:51 + > Mark Thompson <s...@jkqxz.net> wrote: > >> On 11/02/18 07:21, Song, Ruiling wrote: >>> I have run some test against the patches. It works as described. >> >> Great - there is general

Re: [libav-devel] [PATCH 6/8] vf_hwupload/hwmap: Support setting a fixed pool size

2018-02-11 Thread Mark Thompson
On 11/02/18 07:21, Song, Ruiling wrote: > I have run some test against the patches. It works as described. Great - there is general agreement on that part now so I've applied that series. > Are you still against setting a default value within qsv_init_pool()? > Users can easily override the

Re: [libav-devel] [PATCH 10/16] cbs: Refcount all the things!

2018-02-11 Thread Mark Thompson
On 11/02/18 20:13, wm4 wrote: > On Sun, 11 Feb 2018 18:14:34 + > Mark Thompson <s...@jkqxz.net> wrote: > >> --- >> libavcodec/cbs.c | 168 +--- >> libavcodec/cbs.h | 51 - >> libav

Re: [libav-devel] [PATCH] Add AV1 video decoding support through libaom

2018-02-11 Thread Mark Thompson
On 10/02/18 16:29, Luca Barbato wrote: > On 10/02/2018 16:59, Diego Biurrun wrote: >> Looks OK in general. >> >> On Fri, Feb 09, 2018 at 10:51:36AM +0100, Luca Barbato wrote: >>> --- /dev/null >>> +++ b/libavcodec/libaom.c >>> @@ -0,0 +1,90 @@ >>> + >>> +#define HIGH_DEPTH(fmt) 

[libav-devel] [PATCH 16/16] h264_metadata: Add option to delete filler data

2018-02-11 Thread Mark Thompson
Deletes both filler NAL units and filler SEI messages. (Annex B zero_bytes between NAL units are already discarded by the read/write process.) --- libavcodec/h264_metadata_bsf.c | 43 ++ 1 file changed, 43 insertions(+) diff --git

[libav-devel] [PATCH 13/16] h264_metadata: Always add the SEI user data to the first access unit

2018-02-11 Thread Mark Thompson
This should be added even if the first access unit does not contain parameter sets. --- E.g. this is helpful for the "-bsf:v 'h264_metadata=sei_user_data=dc45e9bde6d948b7962cd820d923eeef+x264 - core 150'" hack workaround for old files with stripped metadata. libavcodec/h264_metadata_bsf.c | 8

[libav-devel] [PATCH 10/16] cbs: Refcount all the things!

2018-02-11 Thread Mark Thompson
--- libavcodec/cbs.c | 168 +--- libavcodec/cbs.h | 51 - libavcodec/cbs_h264.h | 4 + libavcodec/cbs_h2645.c | 341 +++-- libavcodec/cbs_h265.h | 2 +

[libav-devel] [PATCH 11/16] cbs_h264: Add utility functions to insert/delete SEI messages

2018-02-11 Thread Mark Thompson
--- libavcodec/cbs_h264.h | 19 +++ libavcodec/cbs_h2645.c | 89 ++ 2 files changed, 108 insertions(+) diff --git a/libavcodec/cbs_h264.h b/libavcodec/cbs_h264.h index 14ea69ae2..8c17680bb 100644 --- a/libavcodec/cbs_h264.h +++

[libav-devel] [PATCH 07/16] cbs: Demote the "decomposition unimplemented" warning

2018-02-11 Thread Mark Thompson
This is harmless and should not be a warning - unknown units are passed through to the write functions unchanged, and no other code will interact with them. --- libavcodec/cbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index

[libav-devel] [PATCH 12/16] h264_metadata: Use common SEI addition function

2018-02-11 Thread Mark Thompson
--- libavcodec/h264_metadata_bsf.c | 70 -- 1 file changed, 19 insertions(+), 51 deletions(-) diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index 6a1904e31..ce85781c6 100644 --- a/libavcodec/h264_metadata_bsf.c +++

[libav-devel] [PATCH 15/16] cbs_h264: Add support for filler NAL units

2018-02-11 Thread Mark Thompson
--- libavcodec/cbs_h264.h | 6 ++ libavcodec/cbs_h2645.c| 21 + libavcodec/cbs_h264_syntax_template.c | 29 + 3 files changed, 56 insertions(+) diff --git a/libavcodec/cbs_h264.h b/libavcodec/cbs_h264.h index

[libav-devel] [PATCH 08/16] cbs_h2645: Remove active ps references when it is replaced

2018-02-11 Thread Mark Thompson
--- libavcodec/cbs_h2645.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index e3b5bf618..9d05d5915 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -674,6 +674,8 @@ static int cbs_h26 ## h26n ## _replace_ ##

[libav-devel] [PATCH 14/16] cbs_h264: Move slice_group_id array out of PPS structure

2018-02-11 Thread Mark Thompson
It's very large, and is only used in some FMO streams. --- libavcodec/cbs_h264.h | 4 +++- libavcodec/cbs_h2645.c| 10 +- libavcodec/cbs_h264_syntax_template.c | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/libavcodec/cbs_h264.h

[libav-devel] [PATCH 09/16] cbs_h264: Add hack for pic_timing with no active SPS

2018-02-11 Thread Mark Thompson
If there is exactly one possible SPS but it is not yet active then just assume that it should be the active one. --- libavcodec/cbs_h264_syntax_template.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/cbs_h264_syntax_template.c

[libav-devel] [PATCH 04/16] vaapi_encode: Allocate slice structures and parameter buffers dynamically

2018-02-11 Thread Mark Thompson
From: Jun Zhao <mypopy...@gmail.com> This removes the arbitrary limit on the allowed number of slices and parameter buffers. From ffmpeg commit e4a6eb70f471eda36592078e8fa1bad87fc9df73. Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavcodec/vaapi_e

[libav-devel] [PATCH 01/16] cbs: Allocate the context inside the init function

2018-02-11 Thread Mark Thompson
... instead of making the caller allocate it themselves. This is more consistent with other APIs in libav. --- This one and the following two have been hanging around for a while (they came from the merge into the other tine). libavcodec/cbs.c| 20 +---

[libav-devel] [PATCH 03/16] cbs: Minor comment fixes / cosmetics

2018-02-11 Thread Mark Thompson
--- libavcodec/cbs.h | 35 +++ libavcodec/cbs_internal.h | 3 +++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h index 85c7b5557..ffeca057a 100644 --- a/libavcodec/cbs.h +++ b/libavcodec/cbs.h @@ -25,6

[libav-devel] [PATCH 05/16] vaapi_encode: Destroy output buffer pool before VA context

2018-02-11 Thread Mark Thompson
The buffers are created associated with the context, so they should be destroyed before the context is. This is enforced by the iHD driver. --- This patch and the following one were posted late last year, but there was no conclusion. There is some suggestion that the driver might be fixed for

[libav-devel] [PATCH 02/16] cbs: Add an explicit type for coded bitstream unit types

2018-02-11 Thread Mark Thompson
Also fix conversion specifiers used for the unit type. --- libavcodec/cbs.c | 12 +++- libavcodec/cbs.h | 19 +++ libavcodec/cbs_h2645.c | 2 +- libavcodec/cbs_mpeg2.c | 4 ++-- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/libavcodec/cbs.c

[libav-devel] [PATCH 06/16] vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalid

2018-02-11 Thread Mark Thompson
The iHD driver looks at entries beyond num_ref_idx_l[01]_active_minus1 for unknown reasons. --- libavcodec/vaapi_encode_h265.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index

Re: [libav-devel] Add HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK

2018-02-04 Thread Mark Thompson
On 03/02/18 17:23, Diego Biurrun wrote: > On Thu, Jan 04, 2018 at 02:59:02PM +, Mironov, Mikhail wrote: >>> On 1/3/2018 7:53 PM, Sean McGovern wrote: 2 things: - does this actually depend on dlopen directly, or should it be libdl, like the entries below it? >>> >>> If this

[libav-devel] [PATCH 6/8] vf_hwupload/hwmap: Support setting a fixed pool size

2018-02-04 Thread Mark Thompson
These filters do not directly know whether the API they are using will support dynamic frame pools, so this is somewhat tricky. If the user sets extra_hw_frames, we assume that they are aware of the problem and set a fixed size based on that. If not, most cases use dynamic sizing just like they

[libav-devel] [PATCH 2/8] lavc: Add per-thread surfaces in get_hw_frame_parameters()

2018-02-04 Thread Mark Thompson
This number is definitely required when frame threading is enabled, so add it here rather than forcing all users to handle it themselves. DXVA2 contained this addition in specific code as well (therefore being added twice in the internal case) - just remove it from there. --- libavcodec/decode.c

[libav-devel] [PATCH 4/8] vf_*_vaapi: Support increasing hardware frame pool size

2018-02-04 Thread Mark Thompson
Defaults to 10 frames to preserve compatibility, but can allocate fewer if extra_hw_frames is set explicitly. --- libavfilter/vf_deinterlace_vaapi.c | 39 +++ libavfilter/vf_scale_vaapi.c | 42 +++--- 2 files changed, 33

[libav-devel] [PATCH 7/8] hwcontext: Perform usual initialisation on derived device contexts

2018-02-04 Thread Mark Thompson
The initialisation should be common. For libmfx, it was previously happening in the derivation function and this moves it out. --- libavutil/hwcontext.c | 4 libavutil/hwcontext_qsv.c | 11 --- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git

[libav-devel] [PATCH 3/8] lavfi: Add support for increasing hardware frame pool sizes

2018-02-04 Thread Mark Thompson
AVFilterContext.extra_hw_frames functions identically to the field of the same name in AVCodecContext. --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 23 +++ libavfilter/avfilter.h | 16 libavfilter/internal.h | 16 4 files

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

2018-02-04 Thread Mark Thompson
--- libavutil/hwcontext.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index cccbd6234..34fb720a7 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -205,19 +205,16 @@ static void

[libav-devel] [PATCH 1/8] lavc: Add support for increasing hardware frame pool sizes

2018-02-04 Thread Mark Thompson
AVCodecContext.extra_hw_frames is added to the size of hardware frame pools created by libavcodec for APIs which require fixed-size pools. This allows the user to keep references to a greater number of frames after decode, which may be necessary for some use-cases. It is also added to the

[libav-devel] [PATCH 5/8] vf_scale_qsv: Support increasing hardware frame pool size

2018-02-04 Thread Mark Thompson
The deinterlacer does not change, because it does not allocate any new frames (for output it uses the same pool as the input). --- libavfilter/vf_scale_qsv.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/libavfilter/vf_scale_qsv.c

Re: [libav-devel] [PATCH 08/12] vf_hwupload/hwmap: Support setting a fixed pool size

2018-02-04 Thread Mark Thompson
On 30/01/18 05:34, wm4 wrote: > On Mon, 29 Jan 2018 23:01:25 + > Mark Thompson <s...@jkqxz.net> wrote: > >> These filters do not directly know whether the API they are using will >> support dynamic frame pools, so this is somewhat tricky. If the user >&g

Re: [libav-devel] [PATCH V2] lavc/qsvdec: expose frame pic_type and key_frame

2018-01-31 Thread Mark Thompson
On 31/01/18 08:11, Li, Zhong wrote: >>> @@ -416,6 +421,8 @@ FF_ENABLE_DEPRECATION_WARNINGS > >>> outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF; > >>> frame->interlaced_frame = > >>> !(outsurf->Info.PicStruct & > >> MFX_PICSTRUCT_PROGRESSIVE); > >>> +

Re: [libav-devel] [PATCH V2] lavc/qsvdec: expose frame pic_type and key_frame

2018-01-30 Thread Mark Thompson
On 30/01/18 09:52, Zhong Li wrote: > Currently key_frame and pict_type are unset. > Add an extra param to fetch the picture type from qsv decoder > > Signed-off-by: ChaoX A Liu > Signed-off-by: Zhong Li > --- > libavcodec/qsv.c | 24

Re: [libav-devel] [PATCH 04/12] lavc/dxva2: Don't add per-thread surfaces twice

2018-01-30 Thread Mark Thompson
On 30/01/18 05:30, wm4 wrote: > On Mon, 29 Jan 2018 23:01:21 + > Mark Thompson <s...@jkqxz.net> wrote: > >> This is already accounted for in the generic code, so it shouldn't also >> be added here. >> --- >> libavcodec/dxva2.c | 4 >> 1

Re: [libav-devel] [PATCH 01/12] lavc: Add support for increasing hardware frame pool sizes

2018-01-30 Thread Mark Thompson
On 30/01/18 05:40, wm4 wrote: > On Mon, 29 Jan 2018 23:01:18 + > Mark Thompson <s...@jkqxz.net> wrote: > >> AVCodecContext.extra_hw_frames is added to the size of hardware frame >> pools created by libavcodec for APIs which require fixed-size pools. >> This a

Re: [libav-devel] [PATCH] hwcontext_qsv: Fix qsv hwupload failure issue

2018-01-30 Thread Mark Thompson
On 30/01/18 03:35, Song, Ruiling wrote: >> -Original Message- >> From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of wm4 >> Sent: Friday, January 26, 2018 5:15 PM >> To: libav-devel@libav.org >> Subject: Re: [libav-devel] [PATCH] hwcontext_qsv: Fix qsv hwupload failure

[libav-devel] [PATCH 06/12] vf_*_vaapi: Support increasing hardware frame pool size

2018-01-29 Thread Mark Thompson
Defaults to 10 frames to preserve compatibility, but can allocate fewer if extra_hw_frames is set explicitly. --- libavfilter/vf_deinterlace_vaapi.c | 39 +++ libavfilter/vf_scale_vaapi.c | 42 +++--- 2 files changed, 33

[libav-devel] [PATCH 04/12] lavc/dxva2: Don't add per-thread surfaces twice

2018-01-29 Thread Mark Thompson
This is already accounted for in the generic code, so it shouldn't also be added here. --- libavcodec/dxva2.c | 4 1 file changed, 4 deletions(-) diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c index edc8ade96..f111d0b79 100644 --- a/libavcodec/dxva2.c +++ b/libavcodec/dxva2.c @@

[libav-devel] [PATCH 02/12] lavc/vaapi: Support increasing hardware frame pool size

2018-01-29 Thread Mark Thompson
--- libavcodec/vaapi_decode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index cc79875ef..7ff42317e 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -452,6 +452,9 @@ static int

[libav-devel] [PATCH 09/12] hwcontext: Fix documentation for av_hwdevice_ctx_alloc()

2018-01-29 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> From ffmpeg commit 9365dfcbf665b83b2e60c5ec5e2abf1f0a49e2c3. Signed-off-by: Jun Zhao <jun.z...@intel.com> Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavutil/hwcontext.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[libav-devel] [PATCH 01/12] lavc: Add support for increasing hardware frame pool sizes

2018-01-29 Thread Mark Thompson
to the initial_pool_size value returned by avcodec_get_hw_frames_parameters() if a fixed-size pool is required. --- On 26/01/18 23:39, wm4 wrote: > On Fri, 26 Jan 2018 23:30:48 + > Mark Thompson <s...@jkqxz.net> wrote: > >> On 26/01/18 23:13, Mark Thompson wrote: >>> AVFilterCon

[libav-devel] [PATCH 03/12] lavc/dxva2: Support increasing hardware frame pool size

2018-01-29 Thread Mark Thompson
--- libavcodec/dxva2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c index e34409d44..edc8ade96 100644 --- a/libavcodec/dxva2.c +++ b/libavcodec/dxva2.c @@ -608,6 +608,9 @@ int ff_dxva2_common_frame_params(AVCodecContext *avctx, else

[libav-devel] [PATCH 08/12] vf_hwupload/hwmap: Support setting a fixed pool size

2018-01-29 Thread Mark Thompson
These filters do not directly know whether the API they are using will support dynamic frame pools, so this is somewhat tricky. If the user set extra_hw_frames, we assume that they are aware of the problem and set a fixed size based on that. If not, most cases use dynamic sizing just like they

[libav-devel] [PATCH 07/12] vf_scale_qsv: Support increasing hardware frame pool size

2018-01-29 Thread Mark Thompson
The deinterlacer does not change, because it does not allocate any new frames (for output it uses the same pool as the input). --- libavfilter/vf_scale_qsv.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/libavfilter/vf_scale_qsv.c

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

2018-01-29 Thread Mark Thompson
--- libavutil/hwcontext.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 157b73872..3ac17572b 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -205,19 +205,16 @@ static void

[libav-devel] [PATCH 12/12] hwcontext: Fix memory leak on derived frame allocation failure

2018-01-29 Thread Mark Thompson
--- libavutil/hwcontext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 3ac17572b..34fb720a7 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -467,8 +467,10 @@ int av_hwframe_get_buffer(AVBufferRef

[libav-devel] [PATCH 10/12] hwcontext: Perform usual initialisation on derived device contexts

2018-01-29 Thread Mark Thompson
The initialisation should be common. For libmfx, it was previously happening in the derivation function and this moves it out. --- libavutil/hwcontext.c | 4 libavutil/hwcontext_qsv.c | 11 --- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git

[libav-devel] [PATCH 05/12] lavfi: Add support for increasing hardware frame pool sizes

2018-01-29 Thread Mark Thompson
AVFilterContext.extra_hw_frames functions identically to the field of the same name in AVCodecContext. --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 23 +++ libavfilter/avfilter.h | 16 libavfilter/internal.h | 16 4 files

Re: [libav-devel] [PATCH 1/8] lavfi: Add support for modifying hardware frame pool sizes

2018-01-26 Thread Mark Thompson
On 26/01/18 23:13, Mark Thompson wrote: > AVFilterContext.extra_hw_frames functions identically to the field of > the same name in AVCodecContext. Of course, that field doesn't actually exist before this patch now. Updated to reflect that. Still, should the field be in AVCodecContext a

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

2018-01-26 Thread Mark Thompson
--- libavutil/hwcontext.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 157b73872..3ac17572b 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -205,19 +205,16 @@ static void

[libav-devel] [PATCH 4/8] vf_hwupload/hwmap: Support setting a fixed pool size

2018-01-26 Thread Mark Thompson
These filters do not directly know whether the API they are using will support dynamic frame pools, so this is somewhat tricky. If the user set extra_hw_frames, we assume that they are aware of the problem and set a fixed size based on that. If not, most cases use dynamic sizing just like they

[libav-devel] [PATCH 5/8] hwcontext: Fix documentation for av_hwdevice_ctx_alloc()

2018-01-26 Thread Mark Thompson
From: Jun Zhao <jun.z...@intel.com> From ffmpeg commit 9365dfcbf665b83b2e60c5ec5e2abf1f0a49e2c3. Signed-off-by: Jun Zhao <jun.z...@intel.com> Signed-off-by: Mark Thompson <s...@jkqxz.net> --- libavutil/hwcontext.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[libav-devel] [PATCH 3/8] vf_scale_qsv: Support modifying hardware frame pool sizes

2018-01-26 Thread Mark Thompson
The deinterlacer does not change, because it does not allocate any new frames (for output it uses the same pool as the input). --- libavfilter/vf_scale_qsv.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/libavfilter/vf_scale_qsv.c

[libav-devel] [PATCH 8/8] hwcontext: Fix memory leak on derived frame allocation failure

2018-01-26 Thread Mark Thompson
--- libavutil/hwcontext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 3ac17572b..34fb720a7 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -467,8 +467,10 @@ int av_hwframe_get_buffer(AVBufferRef

[libav-devel] [PATCH 1/8] lavfi: Add support for modifying hardware frame pool sizes

2018-01-26 Thread Mark Thompson
AVFilterContext.extra_hw_frames functions identically to the field of the same name in AVCodecContext. --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 23 +++ libavfilter/avfilter.h | 13 + libavfilter/internal.h | 16 4 files

[libav-devel] [PATCH 6/8] hwcontext: Perform usual initialisation on derived device contexts

2018-01-26 Thread Mark Thompson
The initialisation should be common. For libmfx, it was previously happening in the derivation function and this moves it out. --- libavutil/hwcontext.c | 4 libavutil/hwcontext_qsv.c | 10 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/libavutil/hwcontext.c

[libav-devel] [PATCH 2/8] vf_*_vaapi: Support modifying hardware frame pool sizes

2018-01-26 Thread Mark Thompson
Defaults to 10 frames to preserve compatibility, but can allocate fewer if extra_hw_frames is set explicitly. --- libavfilter/vf_deinterlace_vaapi.c | 39 +++ libavfilter/vf_scale_vaapi.c | 42 +++--- 2 files changed, 33

Re: [libav-devel] [PATCH] hwcontext_qsv: Fix qsv hwupload failure issue

2018-01-26 Thread Mark Thompson
On 26/01/18 09:15, wm4 wrote: > On Fri, 26 Jan 2018 05:56:46 + > "Li, Zhong" wrote: > >>> From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of >>> Ruiling Song >>> Sent: Friday, January 26, 2018 9:17 AM >>> To: libav-devel@libav.org >>> Subject:

Re: [libav-devel] qsv: How about replace software parsers with MFXVideoDECODE_DecodeHeader

2018-01-23 Thread Mark Thompson
On 23/01/18 05:05, Li, Zhong wrote: >> From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of Mark >> Thompson >> Sent: Monday, January 22, 2018 9:19 PM >> To: libav-devel@libav.org >> Subject: Re: [libav-devel] qsv: How

Re: [libav-devel] qsv: How about replace software parsers with MFXVideoDECODE_DecodeHeader

2018-01-22 Thread Mark Thompson
On 22/01/18 11:20, Li, Zhong wrote: > MSDK provides an API (MFXVideoDECODE_DecodeHeader) to parse video > parameters. Currently it hasn't been used. > Instead, software parsers are used. It works well for h264 decoder, and > basically works well for hevc decoder (some issues found by Mayxm due

Re: [libav-devel] [PATCH 2/2] vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalid

2017-12-20 Thread Mark Thompson
On 18/12/17 01:59, Jun Zhao wrote: > On 2017/12/18 4:05, Mark Thompson wrote: >> The iHD driver looks at entries beyond num_ref_idx_l[01]_active_minus1 >> for unknown reasons. >> --- >> This still isn't enough to actually work for encoding H.265 with the iHD >> dr

[libav-devel] [PATCH 2/2] vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalid

2017-12-17 Thread Mark Thompson
The iHD driver looks at entries beyond num_ref_idx_l[01]_active_minus1 for unknown reasons. --- This still isn't enough to actually work for encoding H.265 with the iHD driver on Skylake. It can generate output with this rather than crashing, but the output is still wrong (though it does

[libav-devel] [PATCH 1/2] vaapi_encode: Destroy output buffer pool before VA context

2017-12-17 Thread Mark Thompson
The buffers are created associated with the context, so they should be destroyed before the context is. This is enforced by the iHD driver. --- (Causes a crash on close.) libavcodec/vaapi_encode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_encode.c

[libav-devel] [PATCH 3/6] cbs: Demote the "decomposition unimplemented" warning

2017-12-10 Thread Mark Thompson
This is harmless and should not be a warning - unknown units are passed through to the write functions unchanged, and no other code will interact with them. --- libavcodec/cbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index

[libav-devel] [PATCH 2/6] hevc: Remove unused hevc_ps_enc.c

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

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

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

[libav-devel] [PATCH 5/6] cbs_h264: Add hack for pic_timing with no active SPS

2017-12-10 Thread Mark Thompson
If there is exactly one possible SPS but it is not yet active then just assume that it should be the active one. --- libavcodec/cbs_h264_syntax_template.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/cbs_h264_syntax_template.c

[libav-devel] [PATCH 4/6] cbs_h2645: Remove active ps references when it is replaced

2017-12-10 Thread Mark Thompson
--- libavcodec/cbs_h2645.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 00eed0f28..1e7854584 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -674,6 +674,8 @@ static int cbs_h26 ## h26n ## _replace_ ##

[libav-devel] [PATCH 6/6] h264_metadata: Add ability to delete filler data

2017-12-10 Thread Mark Thompson
Deletes both filler NAL units and filler SEI messages. --- libavcodec/h264_metadata_bsf.c | 44 ++ 1 file changed, 44 insertions(+) diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index ac0b9823b..58d598e6d 100644 ---

[libav-devel] [PATCH 6/9] lavc: Remove register mechanism for hwaccels

2017-12-10 Thread Mark Thompson
There is no longer any need for a list of them at runtime, because decoders now carry the pointers to their associated hwaccels internally. The file containing external declarations is now used to make the list of hwaccels for configure. --- configure | 2 +- libavcodec/allcodecs.c

[libav-devel] [PATCH 7/9] lavc: Delete all fake hwaccels

2017-12-10 Thread Mark Thompson
They are now unused. --- configure | 18 +- libavcodec/mmaldec.c | 21 - libavcodec/qsvdec_h2645.c | 18 -- libavcodec/qsvdec_other.c | 27 --- 4 files changed, 5 insertions(+), 79 deletions(-) diff

[libav-devel] [PATCH 9/9] avconv: Use codec hardware config to configure hwaccels

2017-12-10 Thread Mark Thompson
Removes specific support for all hwaccels supported by the generic code (CUVID, DXVA2, D3D11VA, VAAPI and VDPAU). --- avtools/avconv.c | 76 +++- avtools/avconv.h | 9 +- avtools/avconv_hw.c | 249 ++- avtools/avconv_opt.c |

[libav-devel] [PATCH 8/9] lavc: Mark all AVHWAccel structures as const

2017-12-10 Thread Mark Thompson
--- libavcodec/avcodec.h | 2 +- libavcodec/cuvid_h264.c | 2 +- libavcodec/cuvid_hevc.c | 2 +- libavcodec/decode.c | 2 +- libavcodec/dxva2_h264.c | 6 ++--- libavcodec/dxva2_hevc.c | 6 ++--- libavcodec/dxva2_mpeg2.c | 6 ++--- libavcodec/dxva2_vc1.c| 12

[libav-devel] [PATCH 5/9] lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()

2017-12-10 Thread Mark Thompson
--- doc/APIchanges | 4 libavcodec/avcodec.h | 13 + libavcodec/utils.c | 15 +-- libavcodec/version.h | 3 +++ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 9d8c7725e..a1abcffaa 100644 ---

[libav-devel] [PATCH 1/9] lavc: Add codec metadata to indicate hardware support

2017-12-10 Thread Mark Thompson
--- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 74 libavcodec/hwaccel.h | 18 + libavcodec/utils.c | 12 + 4 files changed, 107 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index

[libav-devel] [PATCH 2/9] lavc: Add hardware config metadata for decoders supporting hardware output

2017-12-10 Thread Mark Thompson
This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at

  1   2   3   4   5   6   7   8   9   10   >