Re: [FFmpeg-devel] [PATCH 01/10, v3] avutil: add hwcontext_amf.

2024-06-04 Thread Mark Thompson
On 30/05/2024 14:08, Dmitrii Ovchinnikov wrote: > Adds hwcontext_amf, which allows to use shared AMF > context for the encoder, decoder and AMF-based filters, > without copy to the host memory. > It will also allow you to use some optimisations in > the interaction of components (for example, SAV)

Re: [FFmpeg-devel] [PATCH 02/10, v3] avcodec: add amfdec.

2024-06-04 Thread Mark Thompson
On 30/05/2024 14:08, Dmitrii Ovchinnikov wrote: > From: Evgeny Pavlov > > Added AMF based h264, hevc, av1 decoders. > Co-authored-by: Dmitrii Ovchinnikov > v2: added encoder reinitialisation > v3: use AMF_SURFACE_UNKNOWN to int decoder(ctx->output_format before) > --- > libavcodec/Makefile|

[FFmpeg-devel] [PATCH v3 1/3] lavc/h265_profile_level: Expand profile compatibility checking

2024-06-05 Thread Mark Thompson
Replace existing get_profile() with find_profile(), which finds the lowest compatible profile rather than requiring an exact match. --- Now with an enum tag. libavcodec/h265_profile_level.c | 80 + libavcodec/h265_profile_level.h | 70 -

[FFmpeg-devel] [PATCH v3 2/3] lavc: Add test for H.265 profile handling

2024-06-05 Thread Mark Thompson
--- libavcodec/Makefile | 2 +- libavcodec/tests/.gitignore | 1 + libavcodec/tests/h265_profiles.c | 440 +++ tests/fate/libavcodec.mak| 5 + 4 files changed, 447 insertions(+), 1 deletion(-) create mode 100644 libavcodec/tests/h265_pro

[FFmpeg-devel] [PATCH v3 3/3] lavc/vaapi_hevc: Don't require exact profiles

2024-06-05 Thread Mark Thompson
Rather than turning the constraint flags into a single profile and then searching for that profile (and failing if it doesn't match any profile exactly), instead search all supported profiles and use the first one which supports the given set of constraint flags. --- libavcodec/vaapi_decode.c | 45

[FFmpeg-devel] [PATCH v5 1/2] configure, lavu, lavc, lavfi: Remove libva 1.x support

2024-06-05 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. Various features no longer need any configure check after this change, including all codecs except AV1. Note that the libva version is the API version plus one, so this is removing support for

[FFmpeg-devel] [PATCH v5 2/2] hwcontext_vaapi: Deprecate quirks

2024-06-05 Thread Mark Thompson
These only apply to obsolete drivers which do not work with the now-required libva 2.x. --- Fixed checkheaders. libavutil/hwcontext_vaapi.c | 123 ++-- libavutil/hwcontext_vaapi.h | 17 + 2 files changed, 52 insertions(+), 88 deletions(-) diff --git a/libavu

Re: [FFmpeg-devel] [PATCH 05/16] avutil: add common code for nvtegra

2024-06-05 Thread Mark Thompson
On 30/05/2024 20:43, averne wrote: > This includes a new pixel format for nvtegra hardware frames, and several > objects for interaction with hardware blocks. > In particular, this contains code for channels (handles to hardware engines), > maps (memory-mapped buffers shared with engines), and co

Re: [FFmpeg-devel] [PATCH 06/16] avutil: add nvtegra hwcontext

2024-06-05 Thread Mark Thompson
On 30/05/2024 20:43, averne wrote: > This includes hwdevice and hwframes objects. > As the multimedia engines work with tiled surfaces (block linear in nvidia > jargon), two frame transfer methods are implemented. > The first makes use of the VIC to perform the copy. Since some revisions of > the

Re: [FFmpeg-devel] [PATCH 07/16] hwcontext_nvtegra: add dynamic frequency scaling routines

2024-06-05 Thread Mark Thompson
On 30/05/2024 20:43, averne wrote: > To save on energy, the clock speed of multimedia engines should be adapted to > their workload. > > Signed-off-by: averne > --- > libavutil/hwcontext_nvtegra.c | 165 ++ > libavutil/hwcontext_nvtegra.h | 7 ++ > 2 files chan

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Invalidate PPSs which refer to a changed SPS

2024-06-16 Thread Mark Thompson
On 15/06/2024 17:37, Frank Plowman wrote: > n 15/06/2024 13:24, Nuo Mi wrote: >> On Sat, Jun 15, 2024 at 2:35 PM Christophe Gisquet < >> christophe.gisq...@gmail.com> wrote: >> >>> Le ven. 14 juin 2024, 11:39, Frank Plowman a >>> écrit : >>> When the SPS associated with a particular SPS ID ch

Re: [FFmpeg-devel] [PATCH v1] avcodec/cbs: Keep ff_cbs_trace_syntax_element

2023-10-16 Thread Mark Thompson
mContext *ctx, int position, + const char *name, const int *subscripts, + const char *bitstring, int64_t value); + // Helper functions for read/write of common bitstream elements, including // generation of trace output. The simple functions are equivalent to @Mark Th

Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-16 Thread Mark Thompson
On 16/10/2023 10:13, Evgeny Pavlov wrote: This commit reduces the sleep time on Windows to improve AMF encoding performance on low resolution input videos. This fix is for Windows only, because sleep() function isn't very accurate on Windows OS. Fix for issue #10622 Signed-off-by: Evgeny Pavlov

Re: [FFmpeg-devel] [PATCH avcodec/amfenc: 10 bit support, v4, 1/3] avcodec/amfenc: Fixes the color information in the output.

2023-10-16 Thread Mark Thompson
On 09/10/2023 10:52, Evgeny Pavlov wrote: From: Michael Fabian 'Xaymar' Dirks added 10 bit support for amf hevc. before: command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file.mkv -an -c:v h264_amf res.dx11_hw_h264.mkv output - Format of input

[FFmpeg-devel] [PATCH] amfenc: Use a blocking call instead of sleeping and polling

2023-10-18 Thread Mark Thompson
--- On 17/10/2023 18:11, Evgeny Pavlov wrote: The reason for using av_usleep() here is that AMF API doesn’t provide an API for explicit wait. There are two modes to get output from encoder: 1. Polling with some sleep to avoid CPU thrashing – currently used in FFmpeg 2. Set timeout parameter on

Re: [FFmpeg-devel] [PATCH avcodec/amfenc: 10 bit support, v4, 1/3] avcodec/amfenc: Fixes the color information in the output.

2023-10-18 Thread Mark Thompson
On 17/10/2023 19:00, Evgeny Pavlov wrote: On Mon, Oct 16, 2023 at 11:41 PM Mark Thompson wrote: ... @@ -785,6 +787,41 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) return ret; } +int ff_amf_get_color_profile(AVCodecContext *avctx) +{ +amf_int64

Re: [FFmpeg-devel] [PATCH] amfenc: Use a blocking call instead of sleeping and polling

2023-10-22 Thread Mark Thompson
On 19/10/2023 17:13, Evgeny Pavlov wrote: On Wed, Oct 18, 2023 at 10:36 PM Mark Thompson wrote: --- On 17/10/2023 18:11, Evgeny Pavlov wrote: The reason for using av_usleep() here is that AMF API doesn’t provide an API for explicit wait. There are two modes to get output from encoder: 1

Re: [FFmpeg-devel] [PATCH 2/6] avcodec/cbs: Do not assert on traces beyond 255 bits

2023-10-22 Thread Mark Thompson
On 22/10/2023 01:35, Michael Niedermayer wrote: Fixes: Assertion length < 256 failed at libavcodec/cbs.c:517 Fixes: 62673/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-6490971837431808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects

[FFmpeg-devel] [PATCH 1/2] hwcontext_d3d11: Add BGR0 support

2023-10-22 Thread Mark Thompson
The 8-bit four-component DXGI container is also used for three-component RGB without alpha. --- This list is only used for AV->DXGI mapping, so it doesn't matter that there are duplicate DXGI formats in the list. libavutil/hwcontext_d3d11va.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[FFmpeg-devel] [PATCH 2/2] lavfi/ddagrab: Fix 8-bit BGR output to not advertise an alpha component

2023-10-22 Thread Mark Thompson
There is never an alpha component here, so the actual format is BGR0 rather than BGRA. This fixes cases which maintain the alpha component and therefore generate unexpected results. --- E.g. fixes download and encode with PNG to make an RGB PNG as expected, rather than an RGBA PNG with nothing i

Re: [FFmpeg-devel] [PATCH] libavcodec/amfenc: Add more pixel formats support

2023-10-22 Thread Mark Thompson
On 20/10/2023 09:13, Evgeny Pavlov wrote: On Tue, Jul 18, 2023 at 10:32 AM Evgeny Pavlov wrote: This commit adds BGRA, RGBA and ARGB pixel formats for AMF encoders Signed-off-by: Evgeny Pavlov --- libavcodec/amfenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/amfenc

[FFmpeg-devel] [PATCH] cbs_av1: Reject thirty-two zero bits in uvlc code

2023-10-22 Thread Mark Thompson
The spec allows at least thirty-two zero bits followed by a one to mean 2^32-1, with no constraint on the number of zeroes. The libaom reference decoder does not match this, instead reading thirty-two zeroes but not the following one to mean 2^32-1. These two interpretations are incompatible and

Re: [FFmpeg-devel] [PATCH 2/6] avcodec/cbs: Do not assert on traces beyond 255 bits

2023-10-23 Thread Mark Thompson
On 23/10/2023 21:53, Michael Niedermayer wrote: On Sun, Oct 22, 2023 at 03:34:20PM +0100, Mark Thompson wrote: On 22/10/2023 01:35, Michael Niedermayer wrote: Fixes: Assertion length < 256 failed at libavcodec/cbs.c:517 Fixes: 62673/clusterfuzz-testcase-minimi

Re: [FFmpeg-devel] [PATCH 2/2] avutil/hwcontext_vaapi: return ENOSYS for unsupported operation

2023-10-27 Thread Mark Thompson
On 27/10/2023 16:37, Zhao Zhili wrote: From: Zhao Zhili av_hwframe_transfer_data try with src_ctx first. If the operation failed with AVERROR(ENOSYS), it will try again with dst_ctx. Return AVERROR(EINVAL) makes the second step being skipped. --- libavutil/hwcontext_vaapi.c | 10 +-

Re: [FFmpeg-devel] [PATCH v3] lavu/hwcontext_vaapi: Use vaMapBuffer2 for mapping image buffers

2023-10-27 Thread Mark Thompson
On 27/10/2023 11:00, David Rosca wrote: This allows some optimizations in driver, such as not having to read back the data if write-only mapping is requested. --- v3: Fix another warning libavutil/hwcontext_vaapi.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavutil/hwc

Re: [FFmpeg-devel] [PATCH v3] lavu/hwcontext_vaapi: Use vaMapBuffer2 for mapping image buffers

2023-10-27 Thread Mark Thompson
On 27/10/2023 19:46, David Rosca wrote: On Fri, Oct 27, 2023 at 7:14 PM Mark Thompson wrote: On 27/10/2023 11:00, David Rosca wrote: This allows some optimizations in driver, such as not having to read back the data if write-only mapping is requested. --- v3: Fix another warning libavutil

Re: [FFmpeg-devel] [PATCH] cbs_av1: Reject thirty-two zero bits in uvlc code

2023-11-27 Thread Mark Thompson
On 25/10/2023 21:55, Michael Niedermayer wrote: On Sun, Oct 22, 2023 at 07:35:52PM +0100, Mark Thompson wrote: The spec allows at least thirty-two zero bits followed by a one to mean 2^32-1, with no constraint on the number of zeroes. The libaom reference decoder does not match this, instead

Re: [FFmpeg-devel] [PATCH v2] avcodec/amfenc: add smart access video option

2023-11-27 Thread Mark Thompson
On 23/11/2023 09:41, Evgeny Pavlov wrote: This commit adds option for enabling SmartAccess Video (SAV) in AMF encoders. SAV is an AMD hardware-specific feature which enables the parallelization of encode and decode streams across multiple Video Codec Engine (VCN) hardware instances. Signed-off-b

Re: [FFmpeg-devel] [PATCH v2] avcodec/amfenc: add smart access video option

2023-11-27 Thread Mark Thompson
On 26/11/2023 14:40, Dmitrii Ovchinnikov wrote: The code looks significantly duplicated. This is not moved to amfenc.c since the property has different names for different encoders, and many other properties (also common to different encoders, but with different names) are separated in this w

Re: [FFmpeg-devel] [PATCH v1] lavc/vaapi_encode_av1: Add qp option explicitly to set base q index

2023-11-27 Thread Mark Thompson
On 27/11/2023 00:58, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang Keep same way with librav1e/libsvtav1/qsv_av1.. to make it more acceptable instead of using global option "-global_quality". Fix #10615 Signed-off-by: Fei Wang --- doc/encoders.texi | 1 + libavcodec

Re: [FFmpeg-devel] [PATCH v2] avcodec/amfenc: increase precision of Sleep() on Windows

2023-11-27 Thread Mark Thompson
On 13/11/2023 14:37, Evgeny Pavlov wrote: This commit increase precision of Sleep() function on Windows. This fix reduces the sleep time on Windows to improve AMF encoding performance on low resolution input videos. Fix for issue #10622 v2: use timeBeginPeriod/timeEndPeriod for increasing preci

Re: [FFmpeg-devel] [PATCH 1/2] hwcontext_d3d11: Add BGR0 support

2023-11-27 Thread Mark Thompson
On 22/10/2023 15:54, Mark Thompson wrote: The 8-bit four-component DXGI container is also used for three-component RGB without alpha. --- This list is only used for AV->DXGI mapping, so it doesn't matter that there are duplicate DXGI formats in the list.  libavutil/hwcontext_d3d11

Re: [FFmpeg-devel] [PATCH 1/2] lavc/cbs_h265: Add sps_multilayer_extension support

2023-11-27 Thread Mark Thompson
On 17/11/2023 13:03, Jun Zhao wrote: Add sps_multilayer_extensio support. Signed-off-by: Jun Zhao --- libavcodec/cbs_h265.h | 3 +++ libavcodec/cbs_h265_syntax_template.c | 12 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libavcodec/cbs_h265.h

Re: [FFmpeg-devel] [PATCH 10 bit support v5 1/3] avcodec/amfenc: Fixes the color information in the output.

2023-11-27 Thread Mark Thompson
On 31/10/2023 18:57, Evgeny Pavlov wrote: From: Michael Fabian 'Xaymar' Dirks added 10 bit support for amf hevc. before: command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file.mkv -an -c:v h264_amf res.dx11_hw_h264.mkv output - Format of input

Re: [FFmpeg-devel] [PATCH 10 bit support v5 1/3] avcodec/amfenc: Fixes the color information in the output.

2023-11-28 Thread Mark Thompson
On 28/11/2023 14:39, Evgeny Pavlov wrote: On Mon, Nov 27, 2023 at 8:47 PM Mark Thompson wrote: There is something very wrong with how the header information is working here. With this series applied, I ran: ffmpeg_g.exe -report -y -i in.mp4 -an -c:v hevc_amf -bsf:v trace_headers -frames:v 1

Re: [FFmpeg-devel] [PATCH v2] doc/bitstream_filters: add filter_units practical examples for removing closed captions

2023-12-11 Thread Mark Thompson
On 11/12/2023 16:33, Marth64 wrote: Added v2 label and signed off as per proper procedure. Signed-off-by: Marth64 --- doc/bitstream_filters.texi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index dc4f85bac0..7

Re: [FFmpeg-devel] [PATCH v2 7/7] avcodec: add AV_CODEC_FLAG_CLEAR

2023-12-11 Thread Mark Thompson
On 07/12/2023 23:11, Marton Balint wrote: On Thu, 7 Dec 2023, Anton Khirnov wrote: Quoting Marton Balint (2023-12-06 09:22:20) Signed-off-by: Marton Balint ---  doc/APIchanges |  3 +++  doc/codecs.texi    | 14 ++  libavcodec/avcodec.h   |  4  libavcodec

Re: [FFmpeg-devel] [PATCH 10 bit support v5 1/3] avcodec/amfenc: Fixes the color information in the output.

2023-12-11 Thread Mark Thompson
On 29/11/2023 10:57, Evgeny Pavlov wrote: On Tue, Nov 28, 2023 at 8:13 PM Mark Thompson wrote: I upgraded to 23.11.1 and see no change - the colour information is still missing in the header but not the stream, and the two different sequence parameter sets are identical to what they were

Re: [FFmpeg-devel] [PATCH] Improved the performance of 1 decode + N filter graphs and adaptive bitrate.

2019-03-26 Thread Mark Thompson
On 26/03/2019 22:07, Shaofei Wang wrote: > It enabled MULTIPLE SIMPLE filter graph concurrency, which bring above about > 4%~20% improvement in some 1:N scenarios by CPU or GPU acceleration > > ... > --- > The patch will only effect on multiple SIMPLE filter graphs pipeline, > Passed fate and refi

[FFmpeg-devel] [PATCH] configure: Do not enable both OpenCL-VAAPI interop modes simultaneously

2019-03-26 Thread Mark Thompson
Beignet offers a far more flexiable and complete interface, so choose it by default if available. --- On 23/03/2019 12:27, Mark Thompson wrote: > On 22/03/2019 01:40, Ruiling Song wrote: >> ffmpeg | branch: master | Ruiling Song | Fri Nov 23 >> 13:3

Re: [FFmpeg-devel] [PATCH v3 1/1] lavc/h264_levels: add MaxMBPS checking and update fate test.

2019-03-26 Thread Mark Thompson
On 20/03/2019 09:14, Decai Lin wrote: > 1. add MaxMBPS checking for level idc setting to align with AVC spec >AnnexA table A-1/A-6 level limits. > 2. update h264 level fate test. > > Signed-off-by: Decai Lin > --- > libavcodec/h264_levels.c | 4 +++ > libavcodec/h264_levels.h |

Re: [FFmpeg-devel] [PATCH v9 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper

2019-03-27 Thread Mark Thompson
On 27/03/2019 17:13, Vittorio Giovara wrote: > On Tue, Mar 26, 2019 at 10:47 PM Jing Sun wrote: > >> Signed-off-by: Zhengxu Huang >> Signed-off-by: Hassene Tmar >> Signed-off-by: Jun Zhao >> Signed-off-by: Jing Sun >> --- >> configure| 4 + >> libavcodec/Makefile | 1

Re: [FFmpeg-devel] [PATCH 2/4] lavc/qsvenc: fix hevc vps extradata issues

2019-03-27 Thread Mark Thompson
On 26/03/2019 19:46, Zhong Li wrote: > cbs trace qsv vps header failed due to some reasons: > 1. vps_temporal_id_nesting_flag is not set but spec required it must to >be 1 when vps_max_sub_layers_minus1 is equal to 0. > 2. vps_num_hrd_parameters is not set and written. > 3. other issues in ff_h

Re: [FFmpeg-devel] [PATCH]lavc/vaap_hevc: Do not initialize fields twice

2019-03-27 Thread Mark Thompson
On 27/03/2019 13:58, Carl Eugen Hoyos wrote: > Hi! > > Attached patch fixes a warning when compiling vaapi with clang. > > From 6463a3cf5730be9e9e6003f4aaf6c9fab7f68407 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos > Date: Wed, 27 Mar 2019 14:52:35 +0100 > Subject: [PATCH] lavc/vaapi_hevc: D

Re: [FFmpeg-devel] [PATCH]lavc/vaapi_h264: Do not set unused deprecated fields

2019-03-27 Thread Mark Thompson
On 27/03/2019 14:02, Carl Eugen Hoyos wrote: > Hi! > > I don't think setting vaapi fields that are deprecated makes sense, this > also silences a warning when compiling with clang. > > Please comment, Carl Eugen > > From b1f4e64e577ffecd1eab7b95d8d6f90e261cdd74 Mon Sep 17 00:00:00 2001 > From: C

Re: [FFmpeg-devel] [PATCH] qsv: fix the dangerous macro definitions

2019-03-27 Thread Mark Thompson
On 27/03/2019 10:24, Zhong Li wrote: > Signed-off-by: Zhong Li > --- > libavcodec/qsv_internal.h | 8 > libavfilter/qsvvpp.h | 8 > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h > index 394c558883..8

Re: [FFmpeg-devel] [PATCH] configure: Do not enable both OpenCL-VAAPI interop modes simultaneously

2019-03-27 Thread Mark Thompson
On 27/03/2019 00:59, Song, Ruiling wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Wednesday, March 27, 2019 7:39 AM >> To: FFmpeg development discussions and patches >

Re: [FFmpeg-devel] [PATCH] configure: include pkgconfig path as vaapi header search

2019-03-27 Thread Mark Thompson
On 20/03/2019 07:57, Zhong Li wrote: > Currectly just standard header path and be found, > check_type/struct will fail if vaapi is installed somewhere else. > --- > configure | 18 ++ > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a/configure b/configure > index

Re: [FFmpeg-devel] [PATCH v2] lavc/qsvenc: get vps extradata from MSDK

2019-03-27 Thread Mark Thompson
On 27/03/2019 10:27, Zhong Li wrote: > Signed-off-by: Zhong Li > --- > V2: Fix the regression of qsv h264 encoding since no VPS for h264 > > libavcodec/qsvenc.c | 53 ++-- > libavcodec/qsvenc.h | 3 +++ > libavcodec/qsvenc_hevc.c | 10 +--- > 3

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_decode: add va_profile format map support for HEVC_REXT

2019-03-28 Thread Mark Thompson
On 28/03/2019 04:03, Linjie Fu wrote: > HEVC_REXT will be map to {VAProfileHEVCMain422_10, VAProfileHEVCMain444, > VAProfileHEVCMain444_10} in vaapi_profile_map[], since need to be > distinguished > to select the exact va_profile. > > Add va_profile -> AV_PIX_FMT map for FF_PROFILE_HEVC_REXT to m

Re: [FFmpeg-devel] [PATCH] configure: include pkgconfig path as vaapi header search

2019-04-01 Thread Mark Thompson
On 28/03/2019 05:17, Song, Ruiling wrote: Neo is the successor to Beignet, correct? >>> Yes, that's the truth. >>> Currently we simply checking against the specific header file of OpenCL, >>> which is in-fact not accurate. >>> I am not sure whether you would like to use Neo together with

Re: [FFmpeg-devel] [PATCH] lavc/hevc_ps: parse constraint flags for HEVC REXT

2019-04-01 Thread Mark Thompson
On 01/04/2019 22:38, James Almer wrote: > On 4/1/2019 6:43 AM, Linjie Fu wrote: >> Parse all the constraint flags. >> >> It can be passed to hw decoders to detemine the exact profile for Range >> Extension HEVC. >> >> Signed-off-by: Linjie Fu >> --- >> libavcodec/hevc_ps.c | 18 +++---

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_av1: fix range of allowed values for obu_type

2019-04-01 Thread Mark Thompson
On 24/03/2019 22:28, James Almer wrote: > 0 is a reserved value. > > Signed-off-by: James Almer > --- > libavcodec/cbs_av1_syntax_template.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/cbs_av1_syntax_template.c > b/libavcodec/cbs_av1_syntax_template.c >

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/cbs_av1: add support for Padding OBUs

2019-04-01 Thread Mark Thompson
On 25/03/2019 14:22, James Almer wrote: > Based on itut_t35 Matadata OBU parsing code. > > Signed-off-by: James Almer > --- > libavcodec/cbs_av1.c | 20 + > libavcodec/cbs_av1.h | 7 ++ > libavcodec/cbs_av1_syntax_template.c | 32 +

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/av1_metadata: add an option to remove Padding OBUs

2019-04-01 Thread Mark Thompson
On 25/03/2019 14:22, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/av1_metadata_bsf.c | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c > index 2b74b697e4..fe208feaf5 100644 > --- a/lib

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_av1: fix parsing spatial_id

2019-04-01 Thread Mark Thompson
On 25/03/2019 14:22, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/cbs_av1.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c > index 22330eabf3..77548084b6 100644 > --- a/libavcodec/cbs_av1.c > +++ b/libavc

[FFmpeg-devel] [PATCH v2 2/9] cbs_vp9: Implement parser entrypoint

2019-04-01 Thread Mark Thompson
--- libavcodec/cbs_vp9.c | 90 +++- 1 file changed, 73 insertions(+), 17 deletions(-) diff --git a/libavcodec/cbs_vp9.c b/libavcodec/cbs_vp9.c index 0b5f137ed8..6ea4681d68 100644 --- a/libavcodec/cbs_vp9.c +++ b/libavcodec/cbs_vp9.c @@ -409,15 +409,23 @@ st

[FFmpeg-devel] [PATCH v2 9/9] av1_parser: Reindent

2019-04-01 Thread Mark Thompson
--- libavcodec/av1_parser.c | 74 - 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 4a743d92d4..b848b41050 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -88,43 +8

[FFmpeg-devel] [PATCH v2 4/9] vp9_parser: Return stream properties

2019-04-01 Thread Mark Thompson
Rewrites the parser entirely, using CBS for header parsing. --- libavcodec/vp9_parser.c | 112 +--- 1 file changed, 82 insertions(+), 30 deletions(-) diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c index c957a75667..6bf4f30e80 100644 --- a/libavc

[FFmpeg-devel] [PATCH v2 1/9] cbs: Add entrypoint for parser use

2019-04-01 Thread Mark Thompson
This can avoid copying due to lack of refcounting in parsers. --- libavcodec/cbs.c | 9 + libavcodec/cbs.h | 14 ++ libavcodec/cbs_internal.h | 4 3 files changed, 27 insertions(+) diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index c388be896b..ff98

[FFmpeg-devel] [PATCH v2 7/9] cbs_av1: Fill context information for show-existing-frame

2019-04-01 Thread Mark Thompson
--- libavcodec/cbs_av1_syntax_template.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index 76eb90b279..a9bf78e4ad 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax

[FFmpeg-devel] [PATCH v2 5/9] lavc/qsvdec: Add VP9 decoder support

2019-04-01 Thread Mark Thompson
From: Zhong Li VP9 decoder is supported on Intel kabyLake+ platforms with MSDK Version 1.19+ Signed-off-by: Zhong Li --- On 20/03/2019 14:41, Li, Zhong wrote: > Yes, QSV is a marketing name which is no equal to libmfx/MSDK. > But would be better to keep consistent with others, such as "Intel >

[FFmpeg-devel] [PATCH v2 8/9] av1_parser: Use CBS parser interface

2019-04-01 Thread Mark Thompson
This simplifies the parser and improves performance by reducing the number of allocations and eliminating redundant copies. --- libavcodec/av1_parser.c | 63 + 1 file changed, 13 insertions(+), 50 deletions(-) diff --git a/libavcodec/av1_parser.c b/libavcod

[FFmpeg-devel] [PATCH v2 6/9] cbs_av1: Implement parser entrypoint

2019-04-01 Thread Mark Thompson
--- Unsure about this one - while the patch is short, it's rather invasive in a pretty ugly way with how it abuses the read call. It will still do allocations for the decomposition because of that, even though we don't really want them. Any ideas welcome. libavcodec/cbs_av1.c | 89 ++

[FFmpeg-devel] [PATCH v2 3/9] cbs_vp9: Fill context information for show-existing-frame

2019-04-01 Thread Mark Thompson
The frame being shown could have different properties to the last-decoded one. --- libavcodec/cbs_vp9.h | 3 +++ libavcodec/cbs_vp9_syntax_template.c | 23 +++ 2 files changed, 26 insertions(+) diff --git a/libavcodec/cbs_vp9.h b/libavcodec/cbs_vp9.h index 4c9

Re: [FFmpeg-devel] [PATCH] libavutil/hwcontext_opencl.c: fix bug in `opencl_get_plane_format`

2019-04-07 Thread Mark Thompson
On 06/04/2019 00:05, Jarek Samic wrote: > The `opencl_get_plane_format` function was incorrectly determining the > value used to set the image channel order. This resulted in all RGB > pixel formats being set to the `CL_RGBA` pixel format, regardless of > whether or not they actually *were* RGBA. >

Re: [FFmpeg-devel] [PATCH] libavutil/hwcontext_opencl.c: fix bug in `opencl_get_plane_format`

2019-04-07 Thread Mark Thompson
On 07/04/2019 23:40, Cld fire wrote: >> >> Does anything go wrong if you unconditionally add comp->offset / (depth / >> 8)? > > > Yes. Occasionally there is a depth value less than 8: > > [opencl_get_plane_format] depth is 2 < 8 for format: rgb8 on plane: 0 > [AVHWDeviceContext @ _] Format yuva4

Re: [FFmpeg-devel] [PATCH v2] libavutil/hwcontext_opencl.c: fix bug in `opencl_get_plane_format`

2019-04-08 Thread Mark Thompson
On 08/04/2019 03:01, Jarek Samic wrote: > The `opencl_get_plane_format` function was incorrectly determining the > value used to set the image channel order. This resulted in all RGB > pixel formats being set to the `CL_RGBA` pixel format, regardless of > whether or not they actually *were* RGBA. >

Re: [FFmpeg-devel] [PATCH] lavfi: add nlmeans_opencl filter

2019-04-08 Thread Mark Thompson
On 01/04/2019 08:52, Ruiling Song wrote: > Signed-off-by: Ruiling Song > --- > This filter runs about 2x faster on integrated GPU than nlmeans on my Skylake > CPU. > Anybody like to give some comments? Nice! > configure | 1 + > doc/filters.texi| 4 + >

Re: [FFmpeg-devel] [RFC 0/6] Add V4L2 request API hwaccels

2019-04-08 Thread Mark Thompson
On 08/04/2019 21:09, Jonas Karlman wrote: > Hello, > > This is a request for comments on a new hwaccel using the V4L2 request API > that was created in collaboration with Jernej Skrabec. > > The V4L2 ctrls needed for statless decoding is not yet stable and reside in > private kernel headers. This

Re: [FFmpeg-devel] [PATCH v2] libavutil/hwcontext_opencl.c: fix bug in `opencl_get_plane_format`

2019-04-09 Thread Mark Thompson
On 09/04/2019 02:08, Song, Ruiling wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Tuesday, April 9, 2019 3:49 AM >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re:

[FFmpeg-devel] [PATCH v4 3/7] lavfi/vaapi: Factorise out common code for parameter buffer setup

2019-04-09 Thread Mark Thompson
Also enables cropping on all VAAPI filters, inherited from the existing support in scale_vaapi. --- libavfilter/vaapi_vpp.c| 55 -- libavfilter/vaapi_vpp.h| 8 - libavfilter/vf_deinterlace_vaapi.c | 33 -- libavfilter/vf_misc

[FFmpeg-devel] [PATCH v4 2/7] doc/indevs: Add example using cropping to capture part of a plane

2019-04-09 Thread Mark Thompson
--- doc/indevs.texi | 8 1 file changed, 8 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index 1d5ed65773..a4f0f608d7 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -910,6 +910,14 @@ Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and e

[FFmpeg-devel] [PATCH v4 1/7] vf_crop: Add support for cropping hardware frames

2019-04-09 Thread Mark Thompson
Set the cropping fields in the AVFrame. --- On 26/03/2019 10:59, Song, Ruiling wrote:> > I think we need to make scale_vaapi evaluate input dimensions considering > crop information. What do you think? I agree. But the cropping information is currently carried on the frame, not at any higher l

[FFmpeg-devel] [PATCH v4 4/7] vf_misc_vaapi: Add missing return value checks

2019-04-09 Thread Mark Thompson
Parameter buffer creation can fail. --- libavfilter/vf_misc_vaapi.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavfilter/vf_misc_vaapi.c b/libavfilter/vf_misc_vaapi.c index 6f31a04293..6fbd453741 100644 --- a/libavfilter/vf_misc_vaapi.c +++ b/libavfilter/

[FFmpeg-devel] [PATCH v4 6/7] vf_scale_vaapi: Add options to configure output colour properties

2019-04-09 Thread Mark Thompson
The "out_color_matrix" and "out_range" properties match the same options in vf_scale; the others attempt to follow the same pattern. --- libavfilter/vf_scale_vaapi.c | 70 1 file changed, 70 insertions(+) diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter

[FFmpeg-devel] [PATCH v4 5/7] lavfi/vaapi: Improve support for colour properties

2019-04-09 Thread Mark Thompson
Attempts to pick the set of supported colour properties best matching the input. Output is then set with the same values, except for the colour matrix which may change when converting between RGB and YUV. --- On 04/03/2019 11:36, Song, Ruiling wrote: > Why using these magic number instead of meani

[FFmpeg-devel] [PATCH v4 7/7] vaapi_encode: Warn if input has cropping information

2019-04-09 Thread Mark Thompson
Cropping is not supported by VAAPI encode. --- On 26/03/2019 10:59, Song, Ruiling wrote:> > And do we need to add warning message against crop information in encoder if > user failed to add some vaapi filter after crop? > Seems that vaapi encoder does not encode correctly with crop? That's a goo

Re: [FFmpeg-devel] [PATCH RFC v2 2/3] libavcodec: Add thumbnail output to vaapi_h264 decoder

2019-04-09 Thread Mark Thompson
On 08/04/2019 09:53, Zachary Zhou wrote: > This is sample code for reference > > HW support for decode+scaling in a single HW command (VDBOX+SFC). > The primary target usage is video analytics, but can be used playback, > transcoding, etc. > > For VAAPI - > https://github.com/intel/libva > basica

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_parse: change prefix to avpriv for usage in avformat mxf muxer

2019-04-09 Thread Mark Thompson
On 09/04/2019 23:14, Baptiste Coudurier wrote: > --- > libavcodec/h264_parse.c | 2 +- > libavcodec/h264_parser.c | 2 +- > libavcodec/h264_ps.c | 4 ++-- > libavcodec/h264_ps.h | 4 ++-- > libavcodec/h264dec.c | 6 +++--- > 5 files changed, 9 insertions(+), 9 deletions(-) > > diff -

Re: [FFmpeg-devel] [PATCH, v4] lavc/vaapi_decode: find exact va_profile for HEVC_REXT

2019-04-09 Thread Mark Thompson
On 09/04/2019 03:33, Linjie Fu wrote: > Use the profile constraint flags to determine the exact va_profile for > HEVC_REXT. > > Directly cast PTLCommon to H265RawProfileTierLevel, Please don't. The two structures aren't really connected, they shouldn't be assumed to be compatible. >

Re: [FFmpeg-devel] [PATCH] lavfi: add colorkey_opencl filter

2019-04-10 Thread Mark Thompson
On 10/04/2019 04:37, Jarek Samic wrote: > This is a direct port of the CPU filter. > > Signed-off-by: Jarek Samic > --- > This is my submission for the GSoC OpenCL video filters project qualification > task. > > Command you can use to try it out: > > ./ffmpeg -i some_video -i some_img -init_hw

Re: [FFmpeg-devel] [PATCH] lavfi: add colorkey_opencl filter

2019-04-13 Thread Mark Thompson
On 11/04/2019 03:42, Cld fire wrote: > On Wed, Apr 10, 2019 at 6:10 PM Mark Thompson wrote: >>> +// Make sure the input is a format we support >>> +if (fmt != AV_PIX_FMT_ARGB && >>> +fmt != AV_PIX_FMT_RGBA &

Re: [FFmpeg-devel] [PATCH] lavfi: add nlmeans_opencl filter

2019-04-13 Thread Mark Thompson
On 12/04/2019 08:38, Song, Ruiling wrote: +#define RELEASE_KERNEL(k)\ +do { \ +if (k) { \ +cle = clReleaseKernel(k);

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cbs_av1: add a function to get a payload size without trailing zero bytes

2019-04-14 Thread Mark Thompson
On 13/04/2019 20:21, James Almer wrote: > Factor it out from cbs_av1_read_metadata_itut_t35() > > Signed-off-by: James Almer > --- > libavcodec/cbs_av1.c | 11 +++ > libavcodec/cbs_av1_syntax_template.c | 10 +- > 2 files changed, 12 insertions(+), 9 deletions(-)

Re: [FFmpeg-devel] [PATCH 2/2 v2] avcodec/cbs_av1: add support for Padding OBUs

2019-04-14 Thread Mark Thompson
On 13/04/2019 20:25, James Almer wrote: > Based on itut_t35 Matadata OBU parsing code. > > Signed-off-by: James Almer > --- > libavcodec/cbs_av1.c | 20 > libavcodec/cbs_av1.h | 7 +++ > libavcodec/cbs_av1_syntax_template.c | 24 +

Re: [FFmpeg-devel] [PATCH v2] lavfi: add colorkey_opencl filter

2019-04-15 Thread Mark Thompson
On 14/04/2019 05:27, Jarek Samic wrote: > This is a direct port of the CPU filter. > > Signed-off-by: Jarek Samic > --- > I've made the changes requested from the first patch. I also investigated > splitting the kernel into two kernels in order to remove the blending if > branch; I noticed negl

Re: [FFmpeg-devel] [PATCH V2 2/2] lavfi/opencl: add nlmeans_opencl filter

2019-04-16 Thread Mark Thompson
On 12/04/2019 16:09, Ruiling Song wrote: > Signed-off-by: Ruiling Song I can't work out where the problem is, but there is something really weirdly nondeterministic going on here. E.g. $ ./ffmpeg_g -y -init_hw_device opencl:0.0 -i ~/video/test/jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv -an -fil

Re: [FFmpeg-devel] [PATCH V2 1/2] lavfi/opencl: add more opencl helper macro

2019-04-16 Thread Mark Thompson
On 12/04/2019 16:09, Ruiling Song wrote: > Signed-off-by: Ruiling Song > --- > libavfilter/opencl.h | 38 ++ > 1 file changed, 38 insertions(+) > > diff --git a/libavfilter/opencl.h b/libavfilter/opencl.h > index 0b06232ade..0fa5b49d3f 100644 > --- a/libavfilt

Re: [FFmpeg-devel] [PATCH] avcodec/h264_ps: fix storage size for offset_for_ref_frame

2019-04-16 Thread Mark Thompson
On 11/04/2019 04:10, James Almer wrote: > On 4/10/2019 3:30 PM, James Almer wrote: >> The spec defines the valid range of values to be INT32_MIN + 1 to INT32_MAX, >> inclusive. >> >> Signed-off-by: James Almer >> --- >> A good example of why making offsets and sizes of structs like this tied to

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_av1: add support for Scalability Metadata

2019-04-16 Thread Mark Thompson
On 14/04/2019 23:04, James Almer wrote: > Signed-off-by: James Almer > --- > This will make the AV1RawObu struct weigh about ~3kb instead of ~1kb. > > libavcodec/av1.h | 33 > libavcodec/cbs_av1.h | 15 +- > libavcodec/cbs_av1_synt

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/cbs: add helper functions and macros to read and write signed values

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/cbs.c | 79 +++ > libavcodec/cbs_internal.h | 20 +- > 2 files changed, 98 insertions(+), 1 deletion(-) Looks like a sensible addition, some comments below

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/cbs_h2645: add helper macros for signed values

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/cbs_h2645.c | 20 > 1 file changed, 20 insertions(+) > > diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c > index e74f8dce81..a205293b3c 100644 > --- a/libavcodec/cbs_h2645.c

Re: [FFmpeg-devel] [PATCH 3/5] avcodec/cbs_h264: fix storage type for time_offset in Pic Timing SEI

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > The spec defines it as a signed value. > > Signed-off-by: James Almer > --- > The only sample i could find with time_offset values it's in the fate suite, > and in all cases it's 0. > > libavcodec/cbs_h264.h | 2 +- > libavcodec/cbs_h264

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/cbs_h265: fix storage type for time_offset_value in Time Code SEI

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > The spec defines it as an array of signed values, inferred to 0 when not > present. > > Signed-off-by: James Almer > --- > Couldn't find any sample using it. > > libavcodec/cbs_h265.h | 2 +- > libavcodec/cbs_h265_syntax_template.c | 7 +

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/cbs_av1: use the new signed value read/write functions

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > Signed-off-by: James Almer > --- > The sample https://0x0.st/sljR.webm appears to be parsed the exact same way > after this patch. > > libavcodec/cbs_av1.c | 68 ++-- > 1 file changed, 8 insertions(+), 60 deletions

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/cbs_h2645: add helper macros for signed values

2019-04-16 Thread Mark Thompson
On 17/04/2019 00:01, James Almer wrote: > On 4/16/2019 7:57 PM, Mark Thompson wrote: >> On 15/04/2019 22:17, James Almer wrote: >>> Signed-off-by: James Almer >>> --- >>> libavcodec/cbs_h2645.c | 20 >>> 1 file changed, 20

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/cbs: add helper functions and macros to read and write signed values

2019-04-16 Thread Mark Thompson
On 16/04/2019 23:54, James Almer wrote: > On 4/16/2019 7:45 PM, Mark Thompson wrote: >> On 15/04/2019 22:17, James Almer wrote: >>> Signed-off-by: James Almer >>> --- >>> libavcodec/cbs.c | 79 +++ >>> lib

Re: [FFmpeg-devel] [PATCH V2 2/2] lavfi/opencl: add nlmeans_opencl filter

2019-04-20 Thread Mark Thompson
On 17/04/2019 03:43, Song, Ruiling wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Wednesday, April 17, 2019 5:28 AM >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpe

Re: [FFmpeg-devel] [PATCH v3] lavfi: add colorkey_opencl filter

2019-04-20 Thread Mark Thompson
On 17/04/2019 03:08, Jarek Samic wrote: > This is a direct port of the CPU filter. > > Signed-off-by: Jarek Samic > --- > More fixes based on the comments from the second version of the patch (moving > sampler declaration into the program scope, `f`-suffixing constants, > attaching the `*` sigi

  1   2   3   4   5   6   7   8   9   10   >